Requirements
Before you begin, take into account the following requirements, limitations, and preparations.How it works
You can choose one of two payment flows:-
A flow with one or more partial payment requests if you do not know the exact balance on the gift card:
- Make a partial gift card payment request for the full amount due.
- If the gift card balance is not enough, you make a follow-up payment request to let the shopper pay the remainder with another card or cash.
-
A flow without partial authorizations where you first check the balance of the gift card:
- Make a balance request to check the balance on the gift card.
-
Decide what to do next:
- If the balance is enough, you make a gift card payment request for the full amount due.
- If the balance is not enough, you make a gift card payment request for the full balance, and then you make a regular payment request to let the shopper pay the remainder with a different card or cash.
1. Make the initial payment
Testing
You can test the partial authorization flow using an amount ending in 139. To make a payment using a gift card where partial authorization is possible:-
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 key entry (MKE), send the request first. The payment terminal will show a prompt to swipe the card or enter the card details.
-
Make a payment request, specifying:
-
The standard
SaleToPOIRequest.MessageHeaderobject, withMessageClassset to Service andMessageCategoryset to Payment.
InSaleData.SaleToAcquirerData, specify the tender option in one of the following formats:-
Option 1: a JSON object converted to a Base64 encoded string.
Encode{"tenderOption": "AllowPartialAuthorisation"}to Base64, and pass the resulting string:
"SaleToAcquirerData": "eyJ0ZW5kZXJPcHRpb24iOiAiQWxsb3dQYXJ0aWFsQXV0aG9yaXNhdGlvbiJ9" -
Option 2: a key-value pair:
"SaleToAcquirerData": "tenderOption=AllowPartialAuthorisation"
AdditionalResponsethat you receive. If there are more tender options (for example, ReceiptHandler ) or other data elements that you need to pass in theSaleToAcquirerDatafield, refer to Add information to a payment. -
Option 1: a JSON object converted to a Base64 encoded string.
-
The PaymentRequest.PaymentTransaction object with:
-
The standard
- Gift card payment - Scanned
- Gift card payment - MKE
This example shows a request for a EUR 25.99 payment with a scanned gift card with a secondary security code in the
SaleToAcquirerData field.Gift card payment with partial payment tender option