> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# iDEAL via Adyen: Headless Guide

> Integrate iDEAL via Adyen on your website or mobile application and fully customize your checkout experience using your own UI.

## Before you begin

This guide assumes that you know how to:

* [Initialize Headless Universal Checkout](https://primer.io/docs/checkout/headless.md)

## Accept payments with iDEAL via Adyen

### Prepare the client session

iDEAL via Adyen requires the following data to process a payment successfully. Pass the following data in the client session, or in the payment request (for manual payment creation).

| Parameter Name | Required | Description |
| - | - | - |
| [currencyCode](https://primer.io/docs/api-reference/v2.4/api-reference/client-session-api/create-a-client-session.md#body-currency-code) | ✓ | 3-letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format, e.g. `USD` for US dollars |
| [order](https://primer.io/docs/api-reference/v2.4/api-reference/client-session-api/create-a-client-session.md#body-order.)  ↳ [lineItems](https://primer.io/docs/api-reference/v2.4/api-reference/client-session-api/create-a-client-session.md#body-order-line-items) | ✓ | Details of the line items of the order |

### Prepare the SDK for payments

> [tab] Web
>
> #### Handle payment method
>
> Refer to the updated guide for handling payment methods with redirect: [Handle Payment Methods with Redirect](https://primer.io/docs/checkout/headless.md#step-4c-handle-payment-methods-with-redirect).

> [tab] iOS
>
> #### Pre-requisites
>
> Handling redirects is required for Payment Methods that present a webpage or open a 3rd party application for the customer to enter their credentials and validate their payment.
>
> To enable this feature, ensure that you include the `urlScheme` parameter when configuring the `PrimerPaymentMethodOptions` object.
>
> **Set up redirects**\\
>
> ```swift SWIFT theme={"dark"}
> let settings = PrimerSettings(
>   // ...
>   paymentMethodOptions: PrimerPaymentMethodOptions(
>     urlScheme: "{url scheme}", // e.g. primer://, yourscheme://
>   ),
>   // ...
> )
> ```
>
> **Handle redirects**\\
>
> When the user is redirected back to the main app, the function `application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool` is automatically called by iOS. Make sure to call `Primer.shared.application...` to forward this information to the SDK so that Universal Checkout can continue the flow.
>
> ```swift SWIFT theme={"dark"}
> import PrimerSDK
> import UIKit
> @UIApplicationMain
> class AppDelegate: UIResponder, UIApplicationDelegate {
>   // ...
>   func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
>     return Primer.shared.application(application, continue: userActivity, restorationHandler: restorationHandler)
>   }
> }
> ```
>
> #### Handle payment method
>
> iDEAL via Adyen requires a [Native UI Manager](https://primer.io/docs/checkout/headless.md#native-ui-manager) in order to be presented to the user:
>
> ```swift SWIFT theme={"dark"}
> // 👇 Create the payment method manager
> let nativeUIPaymentMethodManager = try PrimerHeadlessUniversalCheckout.NativeUIManager(paymentMethodType: "ADYEN_IDEAL")
> // 👇 Show the payment method
> try nativeUIPaymentMethodManager.showPaymentMethod(intent: .checkout)
> ```
>
> This code is intended solely for illustrative purposes. As many payment methods share a common approach, it is recommended to centralize the implementation of these methods within your codebase. For a practical demonstration of how to achieve this, please refer to the guide on how to [handle Native UI payment methods](https://primer.io/docs/checkout/headless.md#native-ui-manager).

> [tab] Android
>
> **Handle payment method**\\
>
> iDEAL via Adyen requires a [Native UI Manager](https://primer.io/docs/checkout/headless.md#native-ui-manager) in order to be presented to the user:
>
> ```kotlin KOTLIN theme={"dark"}
> // 👇 Create the payment method manager
> val nativeUiManager = PrimerHeadlessUniversalCheckoutNativeUiManager.newInstance("ADYEN_IDEAL")
> // 👇 Show the payment method
> nativeUiManager.showPaymentMethod(this, PrimerSessionIntent.CHECKOUT)
> ```
>
> This code is intended solely for illustrative purposes. As many payment methods share a common approach, it is recommended to centralize the implementation of these methods within your codebase. For a practical demonstration of how to achieve this, please refer to the guide on how to [handle Native UI payment methods](https://primer.io/docs/checkout/headless.md#native-ui-manager).

> [tab] React Native
>
> **Handle payment method**\\
>
> iDEAL via Adyen requires a [Native UI Manager](https://primer.io/docs/checkout/headless.md#native-ui-manager) in order to be presented to the user:
>
> ```typescript Typescript theme={"dark"}
> // 👇 Create the payment method manager
> const nativeUIManager = new NativeUIManager()
> // 👇 Configure the payment method manager
> await nativeUIManager.configure({ paymentMethodType: 'ADYEN_IDEAL' })
> // 👇 Show the payment method
> await nativeUIManager.showPaymentMethod(SessionIntent.CHECKOUT)
> ```
>
> This code is intended solely for illustrative purposes. As many payment methods share a common approach, it is recommended to centralize the implementation of these methods within your codebase. For a practical demonstration of how to achieve this, please refer to the guide on how to [handle Native UI payment methods](https://primer.io/docs/checkout/headless.md#native-ui-manager).

## Go live

You don’t need to do anything particular to go live — just make sure to use production credentials.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.