# Void / Refund

### Void

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

> Voids a payment transaction completed on the same day. For transactions closed after end of day, refund should be used instead of void.<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":{"GmuVoidRequest":{"type":"object","required":["deviceUniqueId","paymentId","paymentDate","transactionReferenceId"],"properties":{"locale":{"type":"string","description":"Language code. Default is TR"},"conversationId":{"type":"string","description":"Correlation ID"},"deviceUniqueId":{"type":"string","description":"Device unique ID. Maximum 64 characters"},"paymentId":{"type":"string","description":"paymentId of the payment to be voided"},"paymentDate":{"type":"integer","description":"Payment date. Must be in YYYYMMDD format"},"transactionReferenceId":{"type":"string","description":"Reference ID of this void transaction"},"reason":{"type":"string","description":"Void reason"},"description":{"type":"string","description":"Description"}}},"GmuVoidResponse":{"type":"object","properties":{"status":{"type":"string","description":"success or failure"},"errorCode":{"type":"string","description":"Error code"},"errorMessage":{"type":"string","description":"Error message"},"conversationId":{"type":"string","description":"Correlation ID"},"systemTime":{"type":"integer","description":"Timestamp epoch ms"},"deviceUniqueId":{"type":"string","description":"Device ID"},"transactionReferenceId":{"type":"string","description":"Void reference ID"},"paymentId":{"type":"string","description":"Voided payment ID"},"price":{"type":"decimal","description":"Void amount"},"currency":{"type":"string","description":"Currency"},"authCode":{"type":"string","description":"Authorization code"},"hostReference":{"type":"string","description":"Host reference number of the original transaction"},"cancelHostReference":{"type":"string","description":"Host reference number of the void transaction"},"transactionDate":{"type":"string","description":"Transaction date"},"transactionTime":{"type":"string","description":"Transaction time"},"paymentDate":{"type":"integer","description":"Payment date. In YYYYMMDD format"},"transactionDateTime":{"type":"string","description":"Transaction date and time information"},"binNumber":{"type":"string","description":"Card BIN number"},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card"}}}}},"paths":{"/v2/terminal-host/gmu/payment/void":{"post":{"tags":["GMU Payment"],"description":"Voids a payment transaction completed on the same day. For transactions closed after end of day, refund should be used instead of void.\n","parameters":[{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuVoidRequest"}}}},"responses":{"200":{"description":"Successful void result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuVoidResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuVoidResponse"}}}}}}}}}
```

### Refund

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

> Performs a partial or full refund for a completed sale transaction. It is recommended to call the Refundable Sale Info service first to learn which items can be refunded.<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":{"GmuRefundRequest":{"type":"object","required":["deviceUniqueId","paymentId","paymentDate","transactionReferenceId","saleAppName","saleAppVersion","saleItems"],"properties":{"locale":{"type":"string","description":"Language code. Default is TR"},"conversationId":{"type":"string","description":"Correlation ID"},"deviceUniqueId":{"type":"string","description":"Device unique ID. Maximum 64 characters"},"paymentId":{"type":"string","description":"paymentId returned by the sale service"},"paymentDate":{"type":"integer","description":"Payment date. Must be in YYYYMMDD format"},"transactionReferenceId":{"type":"string","description":"Reference ID of this refund transaction"},"saleAppName":{"type":"string","description":"Sale application name"},"saleAppVersion":{"type":"string","description":"Sale application version"},"notificationPhone":{"type":"string","description":"Phone number requested for SMS notification"},"notificationEmail":{"type":"string","description":"Email address requested for notification"},"saleItems":{"type":"array","description":"Items to be refunded. At least 1 item is required","minItems":1,"items":{"$ref":"#/components/schemas/SaleItem"}}}},"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"}}},"GmuRefundResponse":{"type":"object","properties":{"status":{"type":"string","description":"success or failure"},"errorCode":{"type":"string","description":"Error code"},"errorMessage":{"type":"string","description":"Error message"},"conversationId":{"type":"string","description":"Correlation ID"},"systemTime":{"type":"integer","description":"Timestamp epoch ms"},"deviceUniqueId":{"type":"string","description":"Device ID used in the transaction"},"transactionReferenceId":{"type":"string","description":"Reference ID of the refund transaction"},"price":{"type":"decimal","description":"Refund amount"},"vatAmount":{"type":"decimal","description":"VAT amount"},"currency":{"type":"string","description":"Currency"},"invoiceNo":{"type":"string","description":"Invoice number"},"authCode":{"type":"string","description":"Authorization code"},"hostReference":{"type":"string","description":"Host reference number"},"binNumber":{"type":"string","description":"Card BIN number"},"lastFourDigits":{"type":"string","description":"Last 4 digits of the card"},"acquirerName":{"type":"string","description":"Acquirer bank name"},"acquirerId":{"type":"string","description":"Acquirer bank ID"},"batchNo":{"type":"string","description":"Batch number"}}}}},"paths":{"/v2/terminal-host/gmu/payment/refund":{"post":{"tags":["GMU Payment"],"description":"Performs a partial or full refund for a completed sale transaction. It is recommended to call the Refundable Sale Info service first to learn which items can be refunded.\n","parameters":[{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuRefundRequest"}}}},"responses":{"200":{"description":"Successful refund result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuRefundResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuRefundResponse"}}}}}}}}}
```

### **Retrieve Refundable Transaction Information**

## POST /v2/terminal-host/gmu/payment/refundable-sale-info

> Returns refundable item and amount information for the sale related to the given transaction reference. It is recommended to call this before the refund operation; the returned \`saleUid\` value is used as \`relatedSaleId\` in the refund request.<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":{"GmuRefundableSaleInfoRequest":{"type":"object","required":["transactionReferenceId"],"properties":{"locale":{"type":"string","description":"Language code"},"conversationId":{"type":"string","description":"Correlation ID"},"deviceUniqueId":{"type":"string","description":"Device unique ID"},"transactionReferenceId":{"type":"string","description":"Reference ID of the original sale transaction"}}},"GmuRefundableSaleInfoResponse":{"type":"object","properties":{"status":{"type":"string","description":"success or failure"},"errorCode":{"type":"string","description":"Error code"},"errorMessage":{"type":"string","description":"Error message"},"conversationId":{"type":"string","description":"Correlation ID"},"systemTime":{"type":"integer","description":"Timestamp epoch ms"},"saleNumber":{"type":"string","description":"Sale number"},"saleUid":{"type":"string","description":"Unique ID of the sale. Used as relatedSaleId in the refund request."},"totalReturnableAmount":{"type":"decimal","description":"Total refundable amount"},"currency":{"type":"string","description":"Currency"},"saleItems":{"type":"array","description":"Refundable items. Includes returnableQuantity and returnableAmount for each item.","items":{"$ref":"#/components/schemas/RefundableAddedSaleItem"}}}},"RefundableAddedSaleItem":{"type":"object","properties":{"id":{"type":"integer","description":"Item ID"},"name":{"type":"string","description":"Item name"},"itemQuantity":{"type":"integer","description":"Item quantity"},"totalPriceAmount":{"type":"decimal","description":"Total price"},"vatAmount":{"type":"decimal","description":"VAT amount"},"returnableQuantity":{"type":"integer","description":"Refundable quantity"},"returnableAmount":{"type":"decimal","description":"Refundable amount"}}}}},"paths":{"/v2/terminal-host/gmu/payment/refundable-sale-info":{"post":{"tags":["GMU Payment"],"description":"Returns refundable item and amount information for the sale related to the given transaction reference. It is recommended to call this before the refund operation; the returned `saleUid` value is used as `relatedSaleId` in the refund request.\n","parameters":[{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuRefundableSaleInfoRequest"}}}},"responses":{"200":{"description":"Successful refundable sale info result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuRefundableSaleInfoResponse"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GmuRefundableSaleInfoResponse"}}}}}}}}}
```


---

# 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/void-refund.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.
