> For the complete documentation index, see [llms.txt](https://docs.iyzico.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iyzico.com/en/products/physical-pos/terminal-api-integration/vuk-509-services/payment-and-transaction-services.md).

# Payment and Transaction Services

### Complete Payment

## POST /v2/terminal-host/payment

> This service starts the payment transaction on the terminal. The payment is completed by presenting the card on the POS device.\
> Example: "You complete the transaction started by the sales application and receive fields such as paymentId/authCode."\
> \
> Authorization (Bearer Token):\
> \- The token value is the access\_token returned by the OAuth token service.\
> \- Header format:\
> &#x20; Authorization: Bearer {access\_token}<br>

```json
{"openapi":"3.0.3","info":{"title":"Terminal API – Outside Flow","version":"1.0.3"},"tags":[{"name":"Terminal Host"}],"servers":[{"url":"https://api.iyzipay.com"},{"url":"https://sandbox-api.iyzipay.com"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Authorization with Bearer Token.\nHeader format:\nAuthorization: Bearer {access_token}\n\nThe access_token is generated by the OAuth token service and is used in Terminal Host services.\n"}},"schemas":{"CompletePaymentRequest":{"type":"object","required":["conversationId","locale","deviceUniqueId","transactionReferenceId","price","currency","installment","salesType"],"properties":{"conversationId":{"type":"string","description":"ID value used to match the request and response. It is determined by the merchant, and the value sent in the request is returned in the response."},"locale":{"type":"string","description":"Response language.","enum":["tr","en"]},"deviceUniqueId":{"type":"string","description":"Unique identifier defined for the terminal/device where the transaction is performed."},"transactionReferenceId":{"type":"string","description":"uniqueId value generated by the sales application for this sales transaction."},"price":{"type":"number","format":"double","description":"Price Value"},"currency":{"type":"string","description":"Currency"},"salesType":{"type":"string","description":"Sales Type.","enum":["SALE","PRE_AUTH","POST_AUTH"]},"paymentId":{"type":"string","description":"Payment Number. This field is mandatory when performing a postAuth (provision closing) transaction."},"installment":{"type":"integer","format":"int32","description":"Installment Count","enum":[0,1,2,3,4,5,6,7,8,9,10,11,12]}}},"TerminalPaymentSuccessResponse":{"type":"object","properties":{"conversationId":{"type":"string","description":"Unique value sent by the merchant for request-response matching and transaction tracking."},"locale":{"type":"string","description":"Response language","enum":["tr","en"]},"deviceUniqueId":{"type":"string","description":"Unique identifier defined for the terminal/device where the transaction is performed."},"transactionReferenceId":{"type":"string","description":"Unique reference number generated by the sales application for the transaction."},"status":{"type":"string","description":"Transaction result. (SUCCESS, FAILURE, etc.)"},"errorCode":{"type":"string","description":"Error code returned if the transaction fails. It is empty for successful transactions."},"errorMessage":{"type":"string","description":"Descriptive error message returned in case of an error."},"errorGroup":{"type":"string","description":"Group/category information of the error."},"systemTime":{"type":"integer","format":"int64","description":"Unix timestamp value of when the transaction was processed in iyzico systems."},"transactionDateTime":{"type":"string","description":"Date and time when the transaction occurred on the terminal/host (ISO-8601)."},"authCode":{"type":"string","description":"Approval (authorization) code generated by the bank/host."},"paymentId":{"type":"string","description":"Transaction-based unique payment ID generated by iyzico."},"paymentDate":{"type":"string","description":"Date when the transaction is posted (YYYYMMDD)."},"price":{"type":"number","format":"double","description":"Transaction amount."},"installment":{"type":"integer","format":"int32","description":"Installment count. Returns 0 or 1 for single-payment transactions."},"currency":{"type":"string","description":"Transaction currency (e.g. TRY)."},"binNumber":{"type":"string","description":"First 6 digits of the card (BIN)."},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card number."},"hostReference":{"type":"string","description":"Transaction reference number generated by the bank/host system."},"cardType":{"type":"string","description":"Card type. (CREDIT_CARD, DEBIT_CARD, etc.)"},"acquirerId":{"type":"string","description":"Institution ID of the acquiring bank that processes the transaction."},"issuerId":{"type":"string","description":"Institution ID of the issuing bank."},"bankMerchantId":{"type":"string","description":"Merchant number assigned by the bank for the merchant."},"bankTerminalId":{"type":"string","description":"Terminal number defined for the terminal at the bank."},"batchNo":{"type":"string","description":"Batch (end-of-day) number that includes the transaction."},"stanNo":{"type":"string","description":"System Trace Audit Number (STAN)."},"posEntryModeCode":{"type":"string","description":"Code indicating how card information was entered into the POS (e.g. chip, magnetic stripe, contactless)."},"cancelHostReference":{"type":"string","description":"Void transaction reference number"},"refundHostReference":{"type":"string","description":"Refund transaction reference number"}}},"TerminalFailureResponse":{"type":"object","properties":{"status":{"type":"string","description":"Transaction result. (SUCCESS, FAILURE, etc.)"},"errorCode":{"type":"string","description":"Error code returned if the transaction fails. It is empty for successful transactions."},"errorMessage":{"type":"string","description":"Descriptive error message returned in case of an error."},"errorGroup":{"type":"string","description":"Group/category information of the error."},"systemTime":{"type":"integer","format":"int64","description":"Unix timestamp value of when the transaction was processed in iyzico systems."},"consumerErrorMessage":{"type":"string","description":"Error message generated for end users without technical details."}}}}},"paths":{"/v2/terminal-host/payment":{"post":{"tags":["Terminal Host"],"description":"This service starts the payment transaction on the terminal. The payment is completed by presenting the card on the POS device.\nExample: \"You complete the transaction started by the sales application and receive fields such as paymentId/authCode.\"\n\nAuthorization (Bearer Token):\n- The token value is the access_token returned by the OAuth token service.\n- Header format:\n  Authorization: Bearer {access_token}\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletePaymentRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalPaymentSuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalFailureResponse"}}}}}}}}}
```

### Sample Collection

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><a href="https://www.postman.com/iyzico/iyzico/request/47010871-2f3cb41e-04c7-4e3f-8f36-119dffb1d02a">Postman</a></td></tr></tbody></table>

### Query Transaction Status

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

> This service queries the status of a previously completed transaction.\
> Example: You can retrieve the payment status and any error details using the paymentId.\
> \
> Authorization (Bearer Token):\
> \- The token value is the access\_token returned by the OAuth token service.\
> \- Header format:\
> &#x20; Authorization: Bearer {access\_token}<br>

```json
{"openapi":"3.0.3","info":{"title":"Terminal API – Outside Flow","version":"1.0.3"},"tags":[{"name":"Terminal Host"}],"servers":[{"url":"https://api.iyzipay.com"},{"url":"https://sandbox-api.iyzipay.com"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Authorization with Bearer Token.\nHeader format:\nAuthorization: Bearer {access_token}\n\nThe access_token is generated by the OAuth token service and is used in Terminal Host services.\n"}},"schemas":{"QueryTransactionStatusRequest":{"type":"object","description":"Service that queries the status of a transaction.","required":["conversationId","locale","paymentId","deviceUniqueId","transactionReferenceId"],"properties":{"conversationId":{"type":"string","description":"ID value used to match the request and response. It is determined by the merchant, and the value sent in the request is returned in the response."},"locale":{"type":"string","description":"Response language.","enum":["tr","en"]},"paymentId":{"type":"string","description":"Payment Number to be queried"},"deviceUniqueId":{"type":"string","description":"Unique identifier defined for the terminal/device where the transaction is performed."},"transactionReferenceId":{"nullable":true,"oneOf":[{"type":"string"},{"type":"null"}],"description":"Unique reference number generated during the transaction for the payment/void/refund operation to be queried."}}},"TerminalPaymentSuccessResponse":{"type":"object","properties":{"conversationId":{"type":"string","description":"Unique value sent by the merchant for request-response matching and transaction tracking."},"locale":{"type":"string","description":"Response language","enum":["tr","en"]},"deviceUniqueId":{"type":"string","description":"Unique identifier defined for the terminal/device where the transaction is performed."},"transactionReferenceId":{"type":"string","description":"Unique reference number generated by the sales application for the transaction."},"status":{"type":"string","description":"Transaction result. (SUCCESS, FAILURE, etc.)"},"errorCode":{"type":"string","description":"Error code returned if the transaction fails. It is empty for successful transactions."},"errorMessage":{"type":"string","description":"Descriptive error message returned in case of an error."},"errorGroup":{"type":"string","description":"Group/category information of the error."},"systemTime":{"type":"integer","format":"int64","description":"Unix timestamp value of when the transaction was processed in iyzico systems."},"transactionDateTime":{"type":"string","description":"Date and time when the transaction occurred on the terminal/host (ISO-8601)."},"authCode":{"type":"string","description":"Approval (authorization) code generated by the bank/host."},"paymentId":{"type":"string","description":"Transaction-based unique payment ID generated by iyzico."},"paymentDate":{"type":"string","description":"Date when the transaction is posted (YYYYMMDD)."},"price":{"type":"number","format":"double","description":"Transaction amount."},"installment":{"type":"integer","format":"int32","description":"Installment count. Returns 0 or 1 for single-payment transactions."},"currency":{"type":"string","description":"Transaction currency (e.g. TRY)."},"binNumber":{"type":"string","description":"First 6 digits of the card (BIN)."},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card number."},"hostReference":{"type":"string","description":"Transaction reference number generated by the bank/host system."},"cardType":{"type":"string","description":"Card type. (CREDIT_CARD, DEBIT_CARD, etc.)"},"acquirerId":{"type":"string","description":"Institution ID of the acquiring bank that processes the transaction."},"issuerId":{"type":"string","description":"Institution ID of the issuing bank."},"bankMerchantId":{"type":"string","description":"Merchant number assigned by the bank for the merchant."},"bankTerminalId":{"type":"string","description":"Terminal number defined for the terminal at the bank."},"batchNo":{"type":"string","description":"Batch (end-of-day) number that includes the transaction."},"stanNo":{"type":"string","description":"System Trace Audit Number (STAN)."},"posEntryModeCode":{"type":"string","description":"Code indicating how card information was entered into the POS (e.g. chip, magnetic stripe, contactless)."},"cancelHostReference":{"type":"string","description":"Void transaction reference number"},"refundHostReference":{"type":"string","description":"Refund transaction reference number"}}},"TerminalFailureResponse":{"type":"object","properties":{"status":{"type":"string","description":"Transaction result. (SUCCESS, FAILURE, etc.)"},"errorCode":{"type":"string","description":"Error code returned if the transaction fails. It is empty for successful transactions."},"errorMessage":{"type":"string","description":"Descriptive error message returned in case of an error."},"errorGroup":{"type":"string","description":"Group/category information of the error."},"systemTime":{"type":"integer","format":"int64","description":"Unix timestamp value of when the transaction was processed in iyzico systems."},"consumerErrorMessage":{"type":"string","description":"Error message generated for end users without technical details."}}}}},"paths":{"/v2/terminal-host/payment/query-transaction-status":{"post":{"tags":["Terminal Host"],"description":"This service queries the status of a previously completed transaction.\nExample: You can retrieve the payment status and any error details using the paymentId.\n\nAuthorization (Bearer Token):\n- The token value is the access_token returned by the OAuth token service.\n- Header format:\n  Authorization: Bearer {access_token}\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryTransactionStatusRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalPaymentSuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalFailureResponse"}}}}}}}}}
```

{% hint style="warning" %}

#### Query Status – Important Note

**In the Query Status service, the fields `paymentId`, `transactionReferenceId`, and `deviceUniqueId` are not all mandatory at the same time.**

To successfully execute the service, **at least one of the following field combinations must be provided:**

* **If only `paymentId` is sent**\
  The details of the related sale (payment) transaction are returned.
* **If `transactionReferenceId` + `deviceUniqueId` are sent together**\
  Related payment / void / refund transactions can be queried.
* **If `paymentId` + `transactionReferenceId` are sent together**\
  Along with the sale transaction, related void and refund transactions can also be queried.

{% endhint %}

### Sample Collection

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><a href="https://www.postman.com/iyzico/iyzico/request/47010871-95e5c840-8641-404e-897e-8d5cd5ad956f">Postman</a></td></tr></tbody></table>

### Void Payment

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

> This service cancels an eligible payment.\
> Example: "The cancellation process is initiated with paymentId and paymentDate. The cancellation is completed by swiping the card on the POS device."\
> \
> Authorization (Bearer Token):\
> \- The token value is the access\_token returned by the OAuth token service.\
> \- Header format:\
> &#x20; Authorization: Bearer {access\_token}<br>

```json
{"openapi":"3.0.3","info":{"title":"Terminal API – Outside Flow","version":"1.0.3"},"tags":[{"name":"Terminal Host"}],"servers":[{"url":"https://api.iyzipay.com"},{"url":"https://sandbox-api.iyzipay.com"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Authorization with Bearer Token.\nHeader format:\nAuthorization: Bearer {access_token}\n\nThe access_token is generated by the OAuth token service and is used in Terminal Host services.\n"}},"schemas":{"VoidPaymentRequest":{"description":"Payment Reversal Service.","type":"object","required":["conversationId","locale","paymentId","paymentDate","deviceUniqueId","transactionReferenceId"],"properties":{"conversationId":{"type":"string","description":"ID value used to match the request and response. It is determined by the merchant, and the value sent in the request is returned in the response."},"locale":{"type":"string","description":"Response language.","enum":["tr","en"]},"paymentId":{"type":"string","description":"Payment Number to be voided"},"paymentDate":{"type":"string","description":"Date when the transaction is posted (YYYYMMDD)."},"deviceUniqueId":{"type":"string","description":"Unique identifier defined for the terminal/device where the transaction is performed."},"transactionReferenceId":{"type":"string","description":"A unique reference number generated for the void transaction"},"reason":{"type":"string","description":"Void reason"},"description":{"type":"string","description":"Void description"}}},"TerminalPaymentSuccessResponse":{"type":"object","properties":{"conversationId":{"type":"string","description":"Unique value sent by the merchant for request-response matching and transaction tracking."},"locale":{"type":"string","description":"Response language","enum":["tr","en"]},"deviceUniqueId":{"type":"string","description":"Unique identifier defined for the terminal/device where the transaction is performed."},"transactionReferenceId":{"type":"string","description":"Unique reference number generated by the sales application for the transaction."},"status":{"type":"string","description":"Transaction result. (SUCCESS, FAILURE, etc.)"},"errorCode":{"type":"string","description":"Error code returned if the transaction fails. It is empty for successful transactions."},"errorMessage":{"type":"string","description":"Descriptive error message returned in case of an error."},"errorGroup":{"type":"string","description":"Group/category information of the error."},"systemTime":{"type":"integer","format":"int64","description":"Unix timestamp value of when the transaction was processed in iyzico systems."},"transactionDateTime":{"type":"string","description":"Date and time when the transaction occurred on the terminal/host (ISO-8601)."},"authCode":{"type":"string","description":"Approval (authorization) code generated by the bank/host."},"paymentId":{"type":"string","description":"Transaction-based unique payment ID generated by iyzico."},"paymentDate":{"type":"string","description":"Date when the transaction is posted (YYYYMMDD)."},"price":{"type":"number","format":"double","description":"Transaction amount."},"installment":{"type":"integer","format":"int32","description":"Installment count. Returns 0 or 1 for single-payment transactions."},"currency":{"type":"string","description":"Transaction currency (e.g. TRY)."},"binNumber":{"type":"string","description":"First 6 digits of the card (BIN)."},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card number."},"hostReference":{"type":"string","description":"Transaction reference number generated by the bank/host system."},"cardType":{"type":"string","description":"Card type. (CREDIT_CARD, DEBIT_CARD, etc.)"},"acquirerId":{"type":"string","description":"Institution ID of the acquiring bank that processes the transaction."},"issuerId":{"type":"string","description":"Institution ID of the issuing bank."},"bankMerchantId":{"type":"string","description":"Merchant number assigned by the bank for the merchant."},"bankTerminalId":{"type":"string","description":"Terminal number defined for the terminal at the bank."},"batchNo":{"type":"string","description":"Batch (end-of-day) number that includes the transaction."},"stanNo":{"type":"string","description":"System Trace Audit Number (STAN)."},"posEntryModeCode":{"type":"string","description":"Code indicating how card information was entered into the POS (e.g. chip, magnetic stripe, contactless)."},"cancelHostReference":{"type":"string","description":"Void transaction reference number"},"refundHostReference":{"type":"string","description":"Refund transaction reference number"}}},"TerminalFailureResponse":{"type":"object","properties":{"status":{"type":"string","description":"Transaction result. (SUCCESS, FAILURE, etc.)"},"errorCode":{"type":"string","description":"Error code returned if the transaction fails. It is empty for successful transactions."},"errorMessage":{"type":"string","description":"Descriptive error message returned in case of an error."},"errorGroup":{"type":"string","description":"Group/category information of the error."},"systemTime":{"type":"integer","format":"int64","description":"Unix timestamp value of when the transaction was processed in iyzico systems."},"consumerErrorMessage":{"type":"string","description":"Error message generated for end users without technical details."}}}}},"paths":{"/v2/terminal-host/payment/void":{"post":{"tags":["Terminal Host"],"description":"This service cancels an eligible payment.\nExample: \"The cancellation process is initiated with paymentId and paymentDate. The cancellation is completed by swiping the card on the POS device.\"\n\nAuthorization (Bearer Token):\n- The token value is the access_token returned by the OAuth token service.\n- Header format:\n  Authorization: Bearer {access_token}\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidPaymentRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalPaymentSuccessResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalFailureResponse"}}}}}}}}}
```

### Sample Collection

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><a href="https://www.postman.com/iyzico/iyzico/request/47010871-1458f3dd-d397-4c1d-b5bf-8277aadc481e">Postman</a></td></tr></tbody></table>

### Refund Payment

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

> This service performs a refund operation on an eligible payment (partial/total).\
> Example: "A refund process is initiated with paymentId and price. The cancellation process is completed by swiping the card on the POS device."\
> \
> Authorization (Bearer Token):\
> \- The token value is the access\_token returned by the OAuth token service.\
> \- Header format:\
> &#x20; Authorization: Bearer {access\_token}<br>

```json
{"openapi":"3.0.3","info":{"title":"Terminal API – Outside Flow","version":"1.0.3"},"tags":[{"name":"Terminal Host"}],"servers":[{"url":"https://api.iyzipay.com"},{"url":"https://sandbox-api.iyzipay.com"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Authorization with Bearer Token.\nHeader format:\nAuthorization: Bearer {access_token}\n\nThe access_token is generated by the OAuth token service and is used in Terminal Host services.\n"}},"schemas":{"RefundPaymentRequest":{"type":"object","required":["conversationId","locale","paymentId","deviceUniqueId","price","transactionReferenceId","paymentDate"],"properties":{"conversationId":{"type":"string","description":"ID value used to match the request and response. It is determined by the merchant, and the value sent in the request is returned in the response."},"locale":{"type":"string","description":"Request language.","enum":["tr","en"]},"paymentId":{"type":"string","description":"Payment number to be refunded"},"deviceUniqueId":{"type":"string","description":"Unique identifier defined for the terminal/device where the transaction is performed."},"price":{"type":"number","format":"double","description":"Transaction amount."},"transactionReferenceId":{"type":"string","description":"Unique reference number generated by the sales application for the refund transaction."},"paymentDate":{"type":"string","description":"Date when the transaction is posted (YYYYMMDD)."},"reason":{"type":"string","description":"Refund Reason"},"description":{"type":"string","description":"Refund Description"}}},"TerminalPaymentSuccessResponse":{"type":"object","properties":{"conversationId":{"type":"string","description":"Unique value sent by the merchant for request-response matching and transaction tracking."},"locale":{"type":"string","description":"Response language","enum":["tr","en"]},"deviceUniqueId":{"type":"string","description":"Unique identifier defined for the terminal/device where the transaction is performed."},"transactionReferenceId":{"type":"string","description":"Unique reference number generated by the sales application for the transaction."},"status":{"type":"string","description":"Transaction result. (SUCCESS, FAILURE, etc.)"},"errorCode":{"type":"string","description":"Error code returned if the transaction fails. It is empty for successful transactions."},"errorMessage":{"type":"string","description":"Descriptive error message returned in case of an error."},"errorGroup":{"type":"string","description":"Group/category information of the error."},"systemTime":{"type":"integer","format":"int64","description":"Unix timestamp value of when the transaction was processed in iyzico systems."},"transactionDateTime":{"type":"string","description":"Date and time when the transaction occurred on the terminal/host (ISO-8601)."},"authCode":{"type":"string","description":"Approval (authorization) code generated by the bank/host."},"paymentId":{"type":"string","description":"Transaction-based unique payment ID generated by iyzico."},"paymentDate":{"type":"string","description":"Date when the transaction is posted (YYYYMMDD)."},"price":{"type":"number","format":"double","description":"Transaction amount."},"installment":{"type":"integer","format":"int32","description":"Installment count. Returns 0 or 1 for single-payment transactions."},"currency":{"type":"string","description":"Transaction currency (e.g. TRY)."},"binNumber":{"type":"string","description":"First 6 digits of the card (BIN)."},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card number."},"hostReference":{"type":"string","description":"Transaction reference number generated by the bank/host system."},"cardType":{"type":"string","description":"Card type. (CREDIT_CARD, DEBIT_CARD, etc.)"},"acquirerId":{"type":"string","description":"Institution ID of the acquiring bank that processes the transaction."},"issuerId":{"type":"string","description":"Institution ID of the issuing bank."},"bankMerchantId":{"type":"string","description":"Merchant number assigned by the bank for the merchant."},"bankTerminalId":{"type":"string","description":"Terminal number defined for the terminal at the bank."},"batchNo":{"type":"string","description":"Batch (end-of-day) number that includes the transaction."},"stanNo":{"type":"string","description":"System Trace Audit Number (STAN)."},"posEntryModeCode":{"type":"string","description":"Code indicating how card information was entered into the POS (e.g. chip, magnetic stripe, contactless)."},"cancelHostReference":{"type":"string","description":"Void transaction reference number"},"refundHostReference":{"type":"string","description":"Refund transaction reference number"}}},"TerminalFailureResponse":{"type":"object","properties":{"status":{"type":"string","description":"Transaction result. (SUCCESS, FAILURE, etc.)"},"errorCode":{"type":"string","description":"Error code returned if the transaction fails. It is empty for successful transactions."},"errorMessage":{"type":"string","description":"Descriptive error message returned in case of an error."},"errorGroup":{"type":"string","description":"Group/category information of the error."},"systemTime":{"type":"integer","format":"int64","description":"Unix timestamp value of when the transaction was processed in iyzico systems."},"consumerErrorMessage":{"type":"string","description":"Error message generated for end users without technical details."}}}}},"paths":{"/v2/terminal-host/payment/refund":{"post":{"tags":["Terminal Host"],"description":"This service performs a refund operation on an eligible payment (partial/total).\nExample: \"A refund process is initiated with paymentId and price. The cancellation process is completed by swiping the card on the POS device.\"\n\nAuthorization (Bearer Token):\n- The token value is the access_token returned by the OAuth token service.\n- Header format:\n  Authorization: Bearer {access_token}\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundPaymentRequest"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalPaymentSuccessResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalFailureResponse"}}}}}}}}}
```

### Sample Collection

<table data-view="cards"><thead><tr><th></th></tr></thead><tbody><tr><td><a href="https://www.postman.com/iyzico/iyzico/request/47010871-f6b2df0d-fa1c-45d6-b306-6354e5e771d7">Postman</a></td></tr></tbody></table>
