---
title: "Gift card iOS Drop-in integration"
description: "Add gift cards to your iOS Drop-in integration"
url: "https://docs.adyen.com/payment-methods/gift-cards/ios-drop-in"
source_url: "https://docs.adyen.com/payment-methods/gift-cards/ios-drop-in.md"
canonical: "https://docs.adyen.com/payment-methods/gift-cards/ios-drop-in"
last_modified: "2025-08-11T09:51:00+02:00"
language: "en"
---

# Gift card iOS Drop-in integration

Add gift cards to your iOS Drop-in integration

[View source](/payment-methods/gift-cards/ios-drop-in.md)

To see example code for implementing gift cards on iOS, refer to our [GitHub](https://github.com/Adyen/adyen-ios/tree/develop/Demo/Common/IntegrationExamples/AdvancedFlow/DropIn)

On this page, you can find additional configuration for adding gift cards to your iOS Drop-in integration.

## Requirements

This page assumes you have already:

* [Built an iOS Drop-in integration](/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Drop-in).

* [Added each gift card variant that you want to test in your Customer Area](/payment-methods/add-payment-methods).

  You can [test](#test-and-go-live) a limited number of gift card variants and simulate gift card payments. When testing, you use a simulator that tries to behave and respond in the same way as an end-to-end connection with a gift card provider. Before you go live, you must onboard with a gift card provider and add the gift card variant to your [live Customer Area](https://ca-live.adyen.com/).

## API reference

You do not need to send additional fields for gift cards. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:

* [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions): This is the default with [Drop-in v5.0.0](/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Drop-in) or later.
* [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments): If you implemented an [additional use case](/online-payments/build-your-integration).

## Drop-in configuration

Select which endpoint you are integrating:

### Tab: `/sessions`

This is the default with [Drop-in v5.0.0](/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Drop-in) or later.

There is no required gift card specific integration for iOS Drop-in.

### Tab: `/payments`

If you implemented an [additional use case](/online-payments/build-your-integration).

### Required configuration

Add the following events to your gift cards configuration object to let the shopper make a [partial payment](/online-payments/partial-payments) with a gift card and pay the rest with another payment method:

| Event name     | Description                                                                                                                                                                                                          |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `checkBalance` | Called when the shopper pays with gift card. Make a [/paymentMethods/balance](https://docs.adyen.com/api-explorer/Checkout/latest/post/paymentMethods/balance) request.                                              |
| `requestOrder` | Called when the gift card balance is less than the transaction amount. Make an [/orders](https://docs.adyen.com/api-explorer/Checkout/latest/post/orders) request with the `amount` of the total transaction amount. |
| `cancelOrder`  | Called when the shopper cancels the gift card transaction. Make an [/orders/cancel](https://docs.adyen.com/api-explorer/Checkout/latest/post/orders/cancel) request.                                                 |

**Partial payments for gift cards**

```swift
extension MyCheckoutController: PartialPaymentDelegate {
    internal func checkBalance(with data: PaymentComponentData,
                               completion: @escaping (Result<Balance, Error>) -> Void) {
        // Make a POST /paymentMethods/balance request
        completion(.success(balance))
    }
    internal func requestOrder(_ completion: @escaping (Result<PartialPaymentOrder, Error>) -> Void) {
        // Make a POST /orders request
        completion(.success(order))
    }
    internal func cancelOrder(_ order: PartialPaymentOrder) {
        // Make a POST /orders/cancel request
    }
}
```

## Show the payment result

Use the  [resultCode](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments#responses-200-resultCode) from the [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) response to show the payment result to your shopper.

You will also receive the outcome of the payment asynchronously in a [webhook](/development-resources/webhooks). For gift card payments, you can receive the following `resultCode` values:

| resultCode     | Description                                                                                                                                               | Action to take                                                                                                                                                                                         |
| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Authorised** | The payment was successful.                                                                                                                               | Inform the shopper that the payment has been successful. If you are using [manual capture](/online-payments/capture#manual-capture), you also need to [capture](/online-payments/capture) the payment. |
| **Cancelled**  | The shopper cancelled the payment.                                                                                                                        | Ask the shopper whether they want to continue with the order, or ask them to select a different payment method.                                                                                        |
| **Error**      | There was an error when the payment was being processed. For more information, check the [`refusalReason` ](/development-resources/refusal-reasons)field. | Inform the shopper that there was an error processing their payment.                                                                                                                                   |
| **Refused**    | The payment was refused. For more information, check the [`refusalReason` ](/development-resources/refusal-reasons)field.                                 | Ask the shopper to try the payment again using a different payment method.                                                                                                                             |

## Test and go live

Before making live gift card payments, simulate transactions:

1. Test your integration using our [test card numbers](/development-resources/test-cards-and-credentials/alternative-payment-method-credentials#gift-cards) 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](https://ca-test.adyen.com/) > **Transactions** > **Payments**.

When you are ready to go live:

1. Onboard with a gift card provider and add the [gift card variant](/payment-methods/gift-cards#supported-gift-cards) to your [live Customer Area](https://ca-live.adyen.com/).

2. Contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) to add the gift card to your [live Customer Area](https://ca-live.adyen.com/).

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

## See also

* [iOS Drop-in integration guide](/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Drop-in)
* [Webhooks](/development-resources/webhooks)
* [API Explorer](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/overview)
