No momento, esta página não está disponível em português
Payment-method icon

Gift cards Android Drop-in integration

Add gift cards to an existing Drop-in integration.

If you are using Android Drop-in v5.0.0 or later:

This payment method requires no additional configuration.

Follow the Drop-in integration guide.

Our Android Drop-in renders gift cards in your payment form, allowing the shopper to pay with their gift card.

Requirements

Requirement Description
Integration type Make sure that you have an existing Advanced flow Android Drop-in integration.
Setup steps Before you begin, add in your Customer Area.

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: Countries/regions where the gift card you are using is supported. For example, NL.
  • amount.currency: Any supported currency. For example, EUR.

Drop-in configuration

Required configuration

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:

Event name Description
checkBalance(paymentMethodData: PaymentMethodDetails) Called when the shopper pays with gift card. Make a /paymentMethods/balance request.
createOrder() Called when the gift card balance is less than the transaction amount. Make an /orders request with the amount of the total transaction amount.
cancelOrder(order: OrderRequest, shouldUpdatePaymentMethods: Boolean) 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:

  1. 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) resultCode refusalReason
    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.

  2. Check the status of test payments in your test Customer Area > Transactions > Payments.

When you are ready to go live:

  1. Onboard with a gift card provider and add the gift card variant to your live Customer Area.
  2. Contact our Support Team to add the gift card to your live Customer Area.

    You can test end-to-end scenarios in your live environment using real gift card details and small amounts.