Are you looking for test card numbers?

Would you like to contact support?

Point-of-sale icon

Make a refund to a gift card

Make an in-store unreferenced refund to a gift card.

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. Use this if you want to refund a payment made with this gift card. You can also make (multiple) partial refunds in this way.

  • Unreferenced refund: a PaymentRequest with PaymentType Refund. Use this if you can't 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. That's what we describe here 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.

Before you begin

Before you make any gift card transactions, make sure that you have:

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 POST request to a Terminal API endpoint, specifying:

    • PaymentRequest: the body for the refund request. This must include:

      • SaleData.SaleTransactionID.TransactionID: your unique reference for this refund request.
      • SaleData.SaleTransactionID.TimeStamp: date and time of the request, in UTC format.
      • SaleData.SaleReferenceID: your reference to the order that you want to do a refund for. In the Customer Area, it will appear as the Merchant Order for the transaction.
      • PaymentTransaction.AmountsReq: the Currency and RequestedAmount being refunded to the gift card.
      • PaymentData.PaymentType: Refund
      • PaymentData.PaymentInstrumentData.PaymentInstrumentType: StoredValue
      • PaymentData.PaymentInstrumentData.StoredValueAccountID: the gift card details:

        • StoredValueAccountType: GiftCard
        • StoredValueProvider: the gift card issuer: givex, svs, valuelink, or any Intersolve-supported card type.
        • IdentificationType: PAN
        • EntryMode, StoredValueID and ExpiryDate: these parameters depend on the card entry method you are using.

          Card entry Parameters
          • EntryMode: Scanned
          • StoredValueID: gift card number.
          • ExpiryDate: expiry date of the gift card.
          • EntryMode: MagStripe
          • StoredValueID: include this parameter but don't provide a value.
          • EntryMode: Keyed
          • StoredValueID: include this parameter but don't provide a value.

    The example below shows how you would issue a refund of 30.00 GBP to a scanned gift card.

    For more information on the Terminal API request structure, see the Terminal API fundamentals.

    String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";
    String saleID = "YOUR_CASH_REGISTER_ID";
    String transactionID = "YOUR_UNIQUE_TRANSACTION_ID";
    SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
    MessageHeader messageHeader = new MessageHeader();
    messageHeader.setMessageClass( MessageClassType.SERVICE );
    messageHeader.setMessageCategory( MessageCategoryType.PAYMENT );
    messageHeader.setMessageType( MessageType.REQUEST );
    PaymentRequest paymentRequest = new PaymentRequest();
    SaleData saleData = new SaleData();
    TransactionIdentification saleTransactionID = new TransactionIdentification();
    saleTransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar()));
    PaymentTransaction paymentTransaction = new PaymentTransaction();
    AmountsReq amountsReq = new AmountsReq();
    amountsReq.setRequestedAmount( BigDecimal.valueOf(30) );
    PaymentData paymentData = new PaymentData();
    paymentData.setPaymentType( PaymentType.REFUND );
    PaymentInstrumentData paymentInstrumentData = new PaymentInstrumentData();
    paymentInstrumentData.setPaymentInstrumentType( PaymentInstrumentType.STORED_VALUE );
    StoredValueAccountID storedValueAccountID = new StoredValueAccountID();
    storedValueAccountID.setStoredValueAccountType( StoredValueAccountType.GIFT_CARD );
    storedValueAccountID.setIdentificationType( IdentificationType.PAN );
    storedValueAccountID.getEntryMode().add( EntryModeType.SCANNED );

The refund request is sent to the Adyen payments platform for processing.

Refund response

Once processed, your integration receives the refund result. This is provided in a synchronous API response, unless your integration uses asynchronous cloud communications.

If your integration uses asynchronous cloud communications, you receive the response as an event notification.

If the refund request is successful:

  • You receive a response with a PaymentResponse object that includes:

    The example below indicates that the refund of 30.00 GBP was successfully issued to the gift card.

    For more information on the Terminal API response structure, see the Terminal API fundamentals.


Next steps

See also