# Payment and Transaction Services

### **Sale Transaction**

This service is used to perform a standard sale transaction via the GMU device.

During the sale process, the payment amount and sale items are transmitted to the POS device, and the transaction result is returned instantly.

In a successful transaction, the returned **paymentId** is used for subsequent operations such as refund, void, and transaction queries.

> The document type is specified using the **saleDocumentType** field:
>
> 1 → **e-Invoice**\
> 9 → **Expense Receipt**

## POST /v2/terminal-host/gmu/payment

> Performs a standard sale transaction via the GMU device. \`saleDocumentType=1\` can be used for e-Invoice and \`saleDocumentType=9\` for Expense Slip.<br>

```json
{"openapi":"3.0.3","info":{"title":"Terminal API - GMU Payment and Transaction Services","version":"1.0.0"},"tags":[{"name":"GMU Payment","description":"GMU sale and transaction services"}],"servers":[{"url":"https://sandbox-api.iyzipay.com","description":"Sandbox Environment"},{"url":"https://api.iyzipay.com","description":"Live Environment"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer Token authentication is performed using the access token."}},"parameters":{"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content type"}},"schemas":{"GmuPaymentRequest":{"type":"object","required":["deviceUniqueId","transactionReferenceId","price","paidPrice","saleAppName","saleAppVersion","saleDocumentType","saleItems","paymentType"],"properties":{"locale":{"type":"string","description":"Language code. Default is TR"},"conversationId":{"type":"string","description":"Request correlation ID. If left empty, a UUID is generated automatically."},"deviceUniqueId":{"type":"string","description":"Unique identifier of the device. Maximum 64 characters"},"transactionReferenceId":{"type":"string","description":"Unique reference ID assigned by the caller for this transaction. It can be used in void and query operations."},"price":{"type":"decimal","description":"Gross amount. Must be positive"},"paidPrice":{"type":"decimal","description":"Final payable amount. Must be positive"},"paymentType":{"type":"string","description":"Payment type. Card, Cash, etc.","enum":["CARD","CASH"]},"currency":{"type":"string","description":"Currency. Default is TRY","enum":["TRY","USD","EUR"]},"installment":{"type":"integer","description":"Installment count. Default is 1"},"saleAppName":{"type":"string","description":"Name of the sale application"},"saleAppVersion":{"type":"string","description":"Version of the sale application"},"saleDocumentType":{"type":"string","description":"Document type. 1 for e-Invoice, 9 for Expense Slip","enum":["1","9"]},"notificationPhone":{"type":"string","description":"Phone number requested for SMS notification"},"notificationEmail":{"type":"string","description":"Email address requested for notification"},"saleItems":{"type":"array","description":"Sale items. At least 1 item is required.","minItems":1,"items":{"$ref":"#/components/schemas/SaleItem"}},"buyerInfo":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BuyerInfo"}],"description":"Must be filled in if the sale is not made to an end consumer."}}},"SaleItem":{"type":"object","required":["name","unitCode","taxGroupCode","itemQuantity","unitPriceAmount","grossPriceAmount","totalPriceAmount"],"properties":{"name":{"type":"string","description":"Product or service name"},"generic":{"type":"boolean","description":"Generic product information"},"unitCode":{"type":"string","description":"Unit code. Example C62 means quantity piece"},"taxGroupCode":{"type":"string","description":"VAT group code"},"itemQuantity":{"type":"integer","description":"Item quantity"},"unitPriceAmount":{"type":"decimal","description":"Unit price. Must be positive"},"grossPriceAmount":{"type":"decimal","description":"Gross price. Must be positive"},"totalPriceAmount":{"type":"decimal","description":"Total price. Must be positive"}}},"BuyerInfo":{"type":"object","properties":{"customerType":{"type":"integer","description":"Customer type. 1 individual, 2 corporate","enum":[1,2]},"firstName":{"type":"string","description":"First name"},"middleName":{"type":"string","description":"Middle name"},"familyName":{"type":"string","description":"Last name"},"companyName":{"type":"string","description":"Company name. Used for corporate customers"},"taxOfficeCode":{"type":"string","description":"Tax office code"},"taxNumber":{"type":"string","description":"Tax number or Turkish identity number"},"country":{"type":"string","description":"Country"},"city":{"type":"string","description":"City"},"district":{"type":"string","description":"District"}}},"GmuPaymentResponse":{"type":"object","properties":{"status":{"type":"string","description":"success or failure"},"errorCode":{"type":"string","description":"Error code. Returns 0 for successful transactions"},"errorMessage":{"type":"string","description":"Error message"},"conversationId":{"type":"string","description":"Correlation ID matching the request"},"systemTime":{"type":"integer","description":"transaction time epoch ms"},"deviceUniqueId":{"type":"string","description":"ID of the device used in the transaction"},"transactionReferenceId":{"type":"string","description":"Reference ID of the caller"},"transactionDateTime":{"type":"string","description":"Date and time when the transaction occurred"},"paymentId":{"type":"string","description":"Generated payment ID. Used in refund and void operations."},"paymentDate":{"type":"integer","description":"Payment date. In YYYYMMDD format"},"price":{"type":"decimal","description":"Transaction amount"},"installment":{"type":"integer","description":"Installment count"},"acquirerId":{"type":"string","description":"Acquirer bank ID"},"bankMerchantId":{"type":"string","description":"Bank merchant number"},"bankTerminalId":{"type":"string","description":"Bank terminal ID"},"issuerId":{"type":"string","description":"Card issuer institution ID"},"currency":{"type":"string","description":"Currency","enum":["TRY","USD","EUR"]},"authCode":{"type":"string","description":"Authorization code"},"binNumber":{"type":"string","description":"BIN number of the card. First 6 digits"},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card"},"hostReference":{"type":"string","description":"Host reference number"},"cardType":{"type":"string","description":"Card type. Example CREDIT or DEBIT"},"batchNo":{"type":"string","description":"Batch number"},"stanNo":{"type":"string","description":"STAN number"},"posEntryModeCode":{"type":"string","description":"POS entry mode code"},"saleItems":{"type":"array","description":"Details of the sale items added to the transaction","items":{"$ref":"#/components/schemas/AddedSaleItem"}},"saleNumber":{"type":"string","description":"Sale number. Used in partial payment add and complete services referenced in items 7 and 8"}}},"AddedSaleItem":{"type":"object","properties":{"name":{"type":"string","description":"Name of the sale item added to the transaction"},"generic":{"type":"boolean","description":"Generic product information"},"unitCode":{"type":"string","description":"Unit code"},"taxGroupCode":{"type":"string","description":"VAT group code"},"itemQuantity":{"type":"integer","description":"Item quantity"},"unitPriceAmount":{"type":"decimal","description":"Unit price"},"grossPriceAmount":{"type":"decimal","description":"Gross price"},"totalPriceAmount":{"type":"decimal","description":"Total price"}}}}},"paths":{"/v2/terminal-host/gmu/payment":{"post":{"tags":["GMU Payment"],"description":"Performs a standard sale transaction via the GMU device. `saleDocumentType=1` can be used for e-Invoice and `saleDocumentType=9` for Expense Slip.\n","parameters":[{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuPaymentRequest"}}}},"responses":{"200":{"description":"Successful transaction result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuPaymentResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuPaymentResponse"}}}}}}}}}
```

### **Transaction Query**

## POST /v2/terminal-host/gmu/payment/query-transaction-status

> Queries the current status of a payment, refund, or void transaction. A query can be made with \`paymentId\` or \`transactionReferenceId\`, or both can be sent together.<br>

```json
{"openapi":"3.0.3","info":{"title":"Terminal API - GMU Payment and Transaction Services","version":"1.0.0"},"tags":[{"name":"GMU Payment","description":"GMU sale and transaction services"}],"servers":[{"url":"https://sandbox-api.iyzipay.com","description":"Sandbox Environment"},{"url":"https://api.iyzipay.com","description":"Live Environment"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer Token authentication is performed using the access token."}},"parameters":{"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"schema":{"type":"string"},"description":"Content type"}},"schemas":{"GmuQueryTransactionStatusRequest":{"type":"object","description":"At least one of paymentId or transactionReferenceId must be sent.","properties":{"locale":{"type":"string","description":"Language code"},"conversationId":{"type":"string","description":"Correlation ID"},"paymentId":{"type":"string","description":"Payment ID information for the transaction to be queried"},"deviceUniqueId":{"type":"string","description":"Device unique ID"},"transactionReferenceId":{"type":"string","description":"transactionReferenceId sent when initiating the transaction to be queried"}}},"GmuQueryTransactionStatusResponse":{"allOf":[{"$ref":"#/components/schemas/GmuPaymentResponse"},{"type":"object","properties":{"cancelHostReference":{"type":"string","nullable":true,"description":"Host reference of the void transaction if the payment has been voided"},"refundHostReference":{"type":"string","nullable":true,"description":"Host reference of the refund transaction if the payment has been refunded"}}}]},"GmuPaymentResponse":{"type":"object","properties":{"status":{"type":"string","description":"success or failure"},"errorCode":{"type":"string","description":"Error code. Returns 0 for successful transactions"},"errorMessage":{"type":"string","description":"Error message"},"conversationId":{"type":"string","description":"Correlation ID matching the request"},"systemTime":{"type":"integer","description":"transaction time epoch ms"},"deviceUniqueId":{"type":"string","description":"ID of the device used in the transaction"},"transactionReferenceId":{"type":"string","description":"Reference ID of the caller"},"transactionDateTime":{"type":"string","description":"Date and time when the transaction occurred"},"paymentId":{"type":"string","description":"Generated payment ID. Used in refund and void operations."},"paymentDate":{"type":"integer","description":"Payment date. In YYYYMMDD format"},"price":{"type":"decimal","description":"Transaction amount"},"installment":{"type":"integer","description":"Installment count"},"acquirerId":{"type":"string","description":"Acquirer bank ID"},"bankMerchantId":{"type":"string","description":"Bank merchant number"},"bankTerminalId":{"type":"string","description":"Bank terminal ID"},"issuerId":{"type":"string","description":"Card issuer institution ID"},"currency":{"type":"string","description":"Currency","enum":["TRY","USD","EUR"]},"authCode":{"type":"string","description":"Authorization code"},"binNumber":{"type":"string","description":"BIN number of the card. First 6 digits"},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card"},"hostReference":{"type":"string","description":"Host reference number"},"cardType":{"type":"string","description":"Card type. Example CREDIT or DEBIT"},"batchNo":{"type":"string","description":"Batch number"},"stanNo":{"type":"string","description":"STAN number"},"posEntryModeCode":{"type":"string","description":"POS entry mode code"},"saleItems":{"type":"array","description":"Details of the sale items added to the transaction","items":{"$ref":"#/components/schemas/AddedSaleItem"}},"saleNumber":{"type":"string","description":"Sale number. Used in partial payment add and complete services referenced in items 7 and 8"}}},"AddedSaleItem":{"type":"object","properties":{"name":{"type":"string","description":"Name of the sale item added to the transaction"},"generic":{"type":"boolean","description":"Generic product information"},"unitCode":{"type":"string","description":"Unit code"},"taxGroupCode":{"type":"string","description":"VAT group code"},"itemQuantity":{"type":"integer","description":"Item quantity"},"unitPriceAmount":{"type":"decimal","description":"Unit price"},"grossPriceAmount":{"type":"decimal","description":"Gross price"},"totalPriceAmount":{"type":"decimal","description":"Total price"}}}}},"paths":{"/v2/terminal-host/gmu/payment/query-transaction-status":{"post":{"tags":["GMU Payment"],"description":"Queries the current status of a payment, refund, or void transaction. A query can be made with `paymentId` or `transactionReferenceId`, or both can be sent together.\n","parameters":[{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"description":"At least one of paymentId or transactionReferenceId must be sent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuQueryTransactionStatusRequest"}}}},"responses":{"200":{"description":"Successful transaction status query result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuQueryTransactionStatusResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuQueryTransactionStatusResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iyzico.com/en/products/physical-pos/terminal-api-integration/vuk-507-services/payment-and-transaction-services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
