Before issuing an unreferenced refund to the shopper's card, you may want to check if this is the same card that was used for the original payment. To do so, you make a card acquisition request with PaymentType Refund and compare the card alias against the card alias used for purchases. Then you either:
- Pay the refund to the card the shopper presented for the card acquisition: you make a payment request with
PaymentTypeRefund and a reference to the card acquisition. - Cancel the card acquisition. You can then ask the shopper for a different card and start again.
Requirements
Before you begin, take into account the following requirements and preparations.
| Requirement | Description |
|---|---|
| Integration type | A Terminal API integration with payment terminals. |
| Setup steps | Before you begin:
|
Card alias
To verify that you will be issuing the refund to the same card that was used for the payment, you need to save the following identifier from your card acquisition and payment responses:
- Card alias (
alias): A value that uniquely represents the shopper's card number (PAN), for exampleA37317672402294. With this, you can recognize the card that a shopper is using. You cannot use the card alias for making payments. You receive the card alias in theAdditionalResponse.
Depending on your use case, you could also save:
- Other transaction details. For example, the transaction amount.
Make a Refund card acquisition request
-
Make a card acquisition request, specifying:
-
The standard
SaleToPOIRequest.MessageHeaderobject, withMessageClassset to Service andMessageCategoryset to CardAcquisition.Parameter Required Description ProtocolVersion
3.0 MessageClass
Service MessageCategory
CardAcquisition MessageType
Request ServiceID
Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal ( POIID) being used.SaleID
Your unique ID for the POS system component to send this request from. POIID
The unique ID of the terminal to send this request to. Format: [device model]-[serial number].
-
The CardAcquisitionRequest object, including:
Parameter Required Description SaleData.SaleTransactionID
An object with: TransactionID: Your reference to identify the refund. We recommend using a unique value.TimeStamp: The date and time of the request in UTC format.
SaleData.TokenRequestedTypeCustomer. Returns the card alias in the TokenValuefield of the response. Note that the card alias is always returned in theAdditionalResponse.CardAcquisitionTransaction
This object contains: TotalAmount: The amount you want to refund.PaymentType: Refund.
The terminal shows the refund amount with a minus sign (for example, -24.98) and asks the shopper to present their card.
-
-
When you receive the CardAcquisitionResponse, save the following details:
POIData.POITransactionID.TimeStampandPOIData.POITransactionID.TransactionID: you need these details later in your payment request for an unreferenced refund.
From the
AdditionalResponse(depending on the format you used in the request, you receive either a string of form-encoded key-value pairs or a Base64 string that you need to decode to get a JSON object):alias: The card alias, to recognize the customer based on their card.
-
Search the payments stored in your back-end system for a match with the card alias returned in the card acquisition response and the refund amount.
Continue with a refund
If you decide to issue an unreferenced refund to the card that the shopper presented when you made the card acquisition request:
-
Make a payment request, specifying:
-
The standard
SaleToPOIRequest.MessageHeaderobject, withMessageClassset to Service andMessageCategoryset to Payment.Parameter Required Description ProtocolVersion
3.0 MessageClass
Service MessageCategory
Payment MessageType
Request ServiceID
Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal ( POIID) being used.SaleID
Your unique ID for the POS system component to send this request from. POIID
The unique ID of the terminal to send this request to. Format: [device model]-[serial number].
-
The PaymentRequest object with:
Parameter Required Description PaymentTransaction.AmountsReq
An object with: Currency: The transaction currency.RequestedAmount: The refund amount.
PaymentData.PaymentType
Refund PaymentData.CardAcquisitionReference
An object referring to the card acquisition: TimeStamp: The time stamp returned in thePOIData.POITransactionIDof the card acquisition response.TransactionID: The transaction ID returned in thePOIData.POITransactionIDof the card acquisition response.
-
-
Check whether we received your refund request. If we received it:
- The terminal shows the transaction is approved.
- You receive a JSON response with:
Result: SuccessPOIData.POITransactionID.TransactionID: The transaction identifier for this refund request.
-
To learn the result, wait for the REFUND_WITH_DATA webhook.
Refunds are always processed asynchronously. If successful, the refund is issued to the shopper's account.
Continue in a different way
If you decide not to issue an unreferenced refund to the card that the shopper presented when you made the card acquisition request, you need to cancel the card acquisition.
You can then, for example, ask the shopper for another card and start the process again.