Getnet DocsGetnet Docs

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.

ParameterTypeRequiredDescription
AuthorizationCodeStringNoAuthorization code of the original transaction (e.g. from receipt “AUT” or Sale response).
OriginTransDateDateNoDate of the original transaction, in ISO8601 format with time zone. Must be no later than the current date.
AmountLongNoRefund amount in local currency. If omitted, full amount is refunded (partial refunds supported).
SkipConfirmationBoolNoSkip the confirmation screen.
SkipReceiptBoolNoDo not print client receipt.
PrintOnPosBoolNoPrint on POS or return receipt content. See Chapter 4 Printing Responsibility.
RefundTypeEnumNoWhich 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:

FieldTypeRequiredDescription
CodeIntYesResponse code. 0 indicates success.
MessageStringYesResult message (e.g. APPROVED).
CommerceCodeStringYesBranch code approved by Getnet for transaction processing.
TerminalIdStringYesPOS terminal code.
AuthorizationCodeStringYesAuthorization code of the refund transaction.
NsuLastSuccessfulMessageStringYesLast NSU message.
ReceiptContentDictNoStructured 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