Refund a Payment
This guide explains how to refund (or cancel) a previously approved payment using the Integrated POS Refund operation.
What is a refund
The Refund operation reverses a completed sale, in full or in part. It can be performed on the same day as the original sale or within up to 365 days. If any parameter is not provided, the POS displays the corresponding input screens. The manual uses “Cancellation” for this command.
Before you begin
Before issuing a refund:
- A Connector must be created and validated using
Polling - Integrated POS Mode must be active
- The original transaction must be eligible for refund
Step 1: Execute the refund
To perform a refund, call the Refund operation with the details of the original transaction. While most parameters are optional (the POS will request them on screen if missing), providing them ensures a smoother automation flow.
| Parameter | Type | Required | Description |
|---|---|---|---|
AuthorizationCode | String | No | Authorization code of the original transaction (e.g. from receipt “AUT” or Sale response). |
OriginTransDate | Date | No | Date of the original transaction, in ISO8601 format with time zone. Must be no later than the current date. |
Amount | Long | No | Refund amount in local currency. If omitted, full amount is refunded (partial refunds supported). |
SkipConfirmation | Bool | No | Skip the confirmation screen. |
SkipReceipt | Bool | No | Do not print client receipt. |
PrintOnPos | Bool | No | Print on POS or return receipt content. See Chapter 4 Printing Responsibility. |
RefundType | Enum | No | Which part of a sale to refund: SaleWithdrawal (sale and withdrawal), Sale (sale only), or Withdrawal (withdrawal only). |
If required information is omitted, the POS requests it on screen. Refund eligibility and partial-refund rules are enforced by the POS and acquirer. You can issue several refunds against the same original transaction until their combined amount reaches the original total.
The following example demonstrates how to initiate a refund for a previously approved sale. The transaction date (OriginTransDate) must be no later than the current date; the date returned by the original sale is a valid value.
var refundRequest = new RefundRequest
{
AuthorizationCode = "551437",
OriginTransDate = originalSale.AccountingDate,
Amount = 10000
};
var refundResult = await connector.RefundAsync(refundRequest);Step 2: Handle the response
Upon successful processing, the POS returns a structured response containing the result of the reversal. The following fields are always present in a successful refund response:
{
"Code": 0,
"Message": "APPROVED",
"CommerceCode": "1234567890",
"TerminalId": "GET00123",
"AuthorizationCode": "654321",
"NsuLastSuccessfulMessage": "123456789",
"ReceiptContent": null
}Where:
| Field | Type | Required | Description |
|---|---|---|---|
Code | Int | Yes | Response code. 0 indicates success. |
Message | String | Yes | Result message (e.g. APPROVED). |
CommerceCode | String | Yes | Branch code approved by Getnet for transaction processing. |
TerminalId | String | Yes | POS terminal code. |
AuthorizationCode | String | Yes | Authorization code of the refund transaction. |
NsuLastSuccessfulMessage | String | Yes | Last NSU message. |
ReceiptContent | Dict | No | Structured receipt content. null when PrintOnPos is true. See Printing Responsibility. |
ReceiptContent is null when the request sets PrintOnPos to true — the terminal prints the receipt instead of returning it.
Always verify the Code and Message fields before confirming the refund in your system.
Next steps
- For information on processing sales that generate authorization codes, see the Single-Step Payment guide.
- To control receipt printing and retrieve receipt content, refer to the Printing Responsibility guide.
- For a complete reference of Refund parameters and return values, consult the Methods and Parameters Reference.