Skip to main content
If you want to return funds to a shopper’s gift card, you can make a referenced refund or an unreferenced refund:
  • Referenced refund: a ReversalRequest with a reference to the original payment’s transaction identifier. Use this if you want to refund a payment made with this gift card. The transaction identifier references the gift card details, so you do not need to specify them in the refund request. You can also make (multiple) partial refunds in this way. For the detailed steps, refer to Referenced refund.
  • Unreferenced refund: a PaymentRequest with PaymentType Refund. Use this if you cannot connect the refund to a payment made with the gift card but still want to return the funds to this gift card. For example, in a ‘merchandise return’ where the shopper returns an unwanted birthday gift. Because an unreferenced refund to a gift card requires specifying the gift card details, we explain this transaction on this page.
If you want to give the balance of a gift card to a shopper in cash, you should make a cashback request instead.

Requirements

Before you begin, take into account the following requirements, limitations, and preparations.

Make an unreferenced refund

To issue a refund to a gift card:
  1. Determine the card entry method:
    • If you want to scan the card, do that first and use the obtained card details in your request.
    • If you want to swipe the card or use manual keyed entry (MKE), send the request first. The payment terminal will show a prompt to swipe the card or enter the card details.
  2. Make a payment request, specifying:
    • The standard SaleToPOIRequest.MessageHeader object, with MessageClass set to Service and MessageCategory set to Payment.
      In SaleData.SaleToAcquirerData, specify the parameter in one of the following formats:
      • Option 1: a JSON object converted to a Base64 encoded string.
        Encode {"maxLength": "27", "cardMask": "****-****-****-****-****-****-***"} to Base64, and pass the resulting string:
        "SaleToAcquirerData": "eyJtYXhMZW5ndGgiOiAiMjciLCAiY2FyZE1hc2siOiAiKioqKi0qKioqLSoqKiotKioqKi0qKioqLSoqKiotKioqIn0="
      • Option 2: a key-value pair:
        "SaleToAcquirerData": "maxLength=27&cardMask=****-****-****-****-****-****-***"
      The format that you use here will also be the format of the AdditionalResponse that you receive. If there are more tender options (for example, ReceiptHandler ) or other data elements that you need to pass in the SaleToAcquirerData field, refer to Add information to a payment.
    • The PaymentTransaction object with:
    The example below shows how to issue a refund of GBP 30.00 to a scanned gift card.

    JSON

    Java

  3. In the PaymentResponse, check the following: The example below indicates that the refund of GBP 30.00 was successfully issued to the gift card.

See also