> ## 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: Drop In Guide

> Let customers securely make payments using iDEAL via Adyen on your website or mobile application with just a few lines of code.

## Before you begin

This guide assumes that you know how to

* [Show Drop-in Checkout](https://primer.io/docs/checkout/drop-in/)

## 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
>
> #### Show Universal Checkout
>
> iDEAL via Adyen is automatically presented to the customer when calling `Primer.showUniversalCheckout`.
>
> ```typescript Typescript theme={"dark"}
> try {
>   await Primer.showUniversalCheckout(clientToken, {
>     container: '#checkout-container',
>     options,
>     onCheckoutComplete({ payment }) {
>       console.log('Checkout complete.', payment)
>     },
>   })
> } catch (e) {
>   // handle error
> }
> ```
>
> #### Customization
>
> Check the [customization guide](https://primer.io/docs/checkout/drop-in/customization.md#styling-payment-method-button) to learn how to customize payment method buttons.
>
> ```typescript Typescript theme={"dark"}
> const options = {
>   /* Other options ... */
>   style: {
>     paymentMethodButton: {
>       background: string,
>       borderRadius: number | string,
>       boxShadow: string,
>       borderColor: string,
>       height: number,
>       primaryText: TextStyle,
>       logoColor: logoColor,
>       marginTop: string,
>     },
>   },
> }
> ```

> [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)
>   }
> }
> ```
>
> #### Show Universal Checkout
>
> iDEAL via Adyen is automatically presented to the customer when calling `Primer.shared.showUniversalCheckout`.
>
> ```swift SWIFT theme={"dark"}
> class MyViewController: UIViewController {
>   func startUniversalCheckout() {
>     Primer.shared.showUniversalCheckout(clientToken: self.clientToken)
>   }
> }
> ```
>
> #### Customization
>
> Check the [customization guide](https://primer.io/docs/checkout/drop-in/customization.md#styling-payment-method-button) to learn how to customize payment method buttons.

> [tab] Android
>
> #### Show Universal Checkout
>
> iDEAL via Adyen is automatically presented to the customer when calling `Primer.instance.showUniversalCheckout`.
>
> ```kotlin KOTLIN theme={"dark"}
> class CheckoutActivity : AppCompatActivity() {
>   private fun setupObservers() {
>     viewModel.clientToken.observe(this) { clientToken ->
>       showUniversalCheckout(clientToken)
>     }
>   }
>   private fun showUniversalCheckout(clientToken: String) {
>     Primer.instance.showUniversalCheckout(this, clientToken)
>   }
> }
> ```
>
> #### Customization
>
> Check the [customization guide](https://primer.io/docs/checkout/drop-in/customization.md#styling-payment-method-button) to learn how to customize payment method buttons.

> [tab] React Native
>
> #### Show Universal Checkout
>
> iDEAL via Adyen is automatically presented to the customer when calling `Primer.showUniversalCheckout`.
>
> ```typescript TypeScript theme={"dark"}
> const CheckoutScreen = async (props: any) => {
>   const onUniversalCheckoutButtonTapped = async () => {
>     try {
>       await Primer.showUniversalCheckout(clientToken)
>     } catch (err) {
>       // handle error
>     }
>   }
> }
> ```
>
> #### Customization
>
> Check the [customization guide](https://primer.io/docs/checkout/drop-in/customization.md#styling-payment-method-button) to learn how to customize payment method buttons.

## 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.