Skip to main content
After you have activated a gift card and loaded with a balance, you can make a payment with the gift card. There are two gift card payment flows: one using partial authorizations and another that involves a balance check first.

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:
    1. Make a partial gift card payment request for the full amount due.
    2. 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:
    1. Make a balance request to check the balance on the gift card.
    2. 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:
  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 key 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 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"
      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 PaymentRequest.PaymentTransaction object with:
    Select the tabs below to see some example gift card payment requests.
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