Our Android Drop-in renders gift cards in your payment form, allowing the shopper to pay with their gift card.
Before you begin
This page explains how to add gift cards to your existing Android Drop-in integration. The Android Drop-in integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Drop-in integration guide.
Before starting your gift cards integration:
Show gift cards in your payment form
Drop-in uses the
countryCode and the
amount.currency from your /paymentMethods request to show the available payment methods to your shopper. From your server, make a /paymentMethods request specifying:
- countryCode: Country where the gift card you are using is supported. For example, NL.
- amount.currency: Any supported currency. For example, EUR.
You must implement some extra methods in your Drop-in Service class to let the shopper make a partial payment with a gift card and pay the rest with another payment method. Configure drop-in to create an order or cancel an order. After an order is created, make partial payments from your drop-in service.
To configure drop-in to create and cancel orders, implement the following methods in your DropInService:
||Called when the shopper pays with gift card. Make a /paymentMethods/balance request.|
||Called when the gift card balance is less than the transaction amount. Make an /orders request with the
||Called when the shopper cancels the gift card transaction. Make an orders/cancel request.|
The following example shows how to configure Drop-in for gift cards:
Test and go live
Before making live gift card payments, simulate transactions:
Test your integration using our test card numbers depending on your gift card provider. When testing, you use a simulator that tries to behave and respond in the same way as an end-to-end connection.
To simulate a scenario, send one of the following amounts in the test payment request:
Amount (last three digits)
100 Authorised 123 Refused Refused 124 Refused Not enough balance 125 Refused Blocked Card 126 Refused Expired Card 130 Error Acquirer Error 134 Refused Invalid Pin 135 Refused Pin tries exceeded
For example, send a payment amount with 100 as the last three digits, such as 1.00 or 11.00. This will result in an Authorised transaction.
Check the status of test payments in your test Customer Area > Transactions > Payments.
When you are ready to go live: