Are you looking for test card numbers?

Would you like to contact support?

Payment-method icon

Apple Pay Drop-in integration

Add Apple Pay to an existing Drop-in integration.

Our Web Drop-in renders Apple Pay in your payment form. When the shopper selects Apple Pay, Drop-in invokes the payment sheet, where shoppers select the card they want to use, provide contact details and shipping address, and then authenticate the payment through Face ID or Touch ID.

Before you begin

This page explains how to add Apple Pay to your existing Web Drop-in integration. The Web 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 Apple Pay integration:

  1. Make sure that you have set up your back end implementation, and added Drop-in to your payments form.
  2. Sign up for Apple Pay in your Apple Developer account and submit the merchant identifier and payment processing certificate to our Support Team. For more information and detailed instructions, see Enable Apple Pay.
  3. Register and validate your merchant domain with Apple.
  4. Create a merchant identity certificate.
  5. Add Apple Pay in your test Customer Area.

Show Apple Pay in your payment form

  1. 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:

  2. When creating an instance of Drop-in, add the required Apple Pay configuration:

    • amount: The amount of the transaction.
    • currencyCode: The three-character currency code.
    • configuration.merchantName: The merchant name that you want displayed on the Apple Pay payment sheet.
    • configuration.merchantIdentifier: Your Apple Merchant ID.
    • onValidateMerchant: Event called when the payment sheet is displayed. For more information, see Apple Pay documentation.
      const dropin = checkout
        .create('dropin', {
          paymentMethodsConfiguration: {
            applepay: { // Required configuration for Apple Pay
              amount: 1000,
              currencyCode: 'EUR',
              configuration: {
                merchantName: 'Adyen Test merchant', // Name to be displayed on the form
                merchantIdentifier: 'adyen.test.merchant' // Your Apple merchant identifier as described in
              onValidateMerchant: (resolve, reject, validationURL) => {
              // Call the validation endpoint with validationURL.
              // Call resolve(MERCHANTSESSION) or reject() to complete merchant validation.

Optional Drop-in configuration

When creating an instance of Drop-in, you can also:

  • Configure the appearance of the Apple Pay button.
  • Include additional data such as transaction information, fields for billing and shipping contact information.
  • Add logic for specific events on your payment form.

Button configuration

Configuration object Description
buttonType The type of button you want displayed on your payments form. Possible values:
- plain: Apple Pay
- buy: Buy with Apple Pay
- donate: Donate with Apple Pay
- check-out: Check out with Apple Pay
- book: Book with Apple Pay
- subscribe: Subscribe with Apple Pay
buttonColor Specify the color of the button you want displayed on the payment form. Possible values:
- black: Black button
- white: White button with no outline
- white-with-line: White button with black outline

Payment request data

The following configuration options are supported from Components V 2.5.0 unless specified.

Payment request data Configuration object Description
Transaction information version Check the Apple Pay on the Web documentation for version features and compatibility details. Possible values:
  • Version 3: Default. Available in macOS 10.13 and iOS 11.
  • Version 4: Required if you want to use Apple Pay with Maestro. Available in macOS 10.14.1 and iOS 12.1.
totalPriceStatus Default value is final. Indicate if the line item is final or pending.
totalPriceLabel String. Description of the line item.
lineItems A set of line items that explain recurring payments, additional charges, and discounts. Refer to Apple Pay documentation for sample values.
merchantCapabilities Payment capabilities supported by the merchant. Default value is [`supports3DS`]. Refer to Apple Pay documentation for other options.
shippingMethods List of available methods for shipping physical goods. Refer to Apple Pay documentation for sample values.
shippingType Optional value that indicates how purchased items are to be shipped. Refer to Apple Pay documentation for available options.
supportedCountries Specify the ISO 3166 country codes if you only support payments from cards issued in specific countries.
supportedNetworks V 2.4.1 The payment networks you support, for example, visa. Refer to Apple Pay documentation for more information.
Requested billing and shipping contact information requiredBillingContactFields Billing information fields that you require from the shopper to process the transaction. Refer to Apple Pay documentation for sample values.
requiredShippingContactFields Shipping information fields that you require from the shopper to fulfill the order. Refer to Apple Pay documentation for sample values.
Known contact information billingContact Set an up-to-date billing contact information for the shopper.
shippingContact Set an up-to-date shipping contact information for the shopper.
Custom data applicationData A Base64-encoded string used to contain your application-specific data. For example, a shopping cart identifier or an order number that you will need to identify this transaction.

Events V 2.5.0

Apple Pay Component supports the following event handlers on the payment form. Select the event handler names to see the related Apple Pay documentation.

   * @param resolve(ApplePayPaymentMethodUpdate update) Completes the selection of a payment method with an update. This will call
   * @param reject(ApplePayPaymentMethodUpdate update)
   * @param event The event parameter contains the paymentMethod attribute.
   onPaymentMethodSelected: (resolve, reject, event) => {}
   * @param resolve(ApplePayShippingContactUpdate update) Completes the selection of a shipping contact with an update. This will call
   * @param reject(ApplePayShippingContactUpdate update)
   * @param event The event parameter contains the shippingContact attribute.
   onShippingContactSelected: (resolve, reject, event) => {}
   * @param resolve(ApplePayShippingMethodUpdate update) Completes the selection of a shipping method with an update. Will call
   * @param reject(ApplePayShippingMethodUpdate update)
   * @param event The event parameter contains the shippingMethod attribute.
   onShippingMethodSelected: (resolve, reject, event) => {}

Make a payment

When the shopper selects the Pay button, Drop-in calls the onSubmit event, which contains a

  1. Pass the to your server.

  2. From your server, make a /payments request, specifying:

    • paymentMethod: The from the onSubmit event from your front end.
    curl \
    -H "x-API-key: YOUR_X-API-KEY" \
    -H "content-type: application/json" \
    -d '{
      "{ from onSubmit}paymentMethod{/hint}":{
        "applepay.token": "QWIwMmI0YzAhQlFBQkFnQjMv.."
    # Set your X-API-KEY with the API key from the Customer Area.
    adyen =
    adyen.api_key = "YOUR_X-API-KEY"
    response = adyen.checkout.payments({
      :amount => {
        :currency => "EUR",
        :value => 1000
      :reference => "YOUR_ORDER_NUMBER",
      :paymentMethod => {
        :type => "applepay",
        :applepay.token => "QWIwMmI0YzAhQlFBQkFnQjMv.."
      :merchantAccount => "YOUR_MERCHANT_ACCOUNT"
    // Set YOUR_X-API-KEY with the API key from the Customer Area.
    // Change to Environment.LIVE and add the Live URL prefix when you're ready to accept live payments.
        Client client = new Client("YOUR_X-API-KEY", Environment.TEST);
        Checkout checkout = new Checkout(client);
        PaymentsRequest paymentsRequest = new PaymentsRequest();
        String merchantAccount = "YOUR_MERCHANT_ACCOUNT";
        Amount amount = new Amount();
        DefaultPaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails();
        PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);
    // Set your X-API-KEY with the API key from the Customer Area.
    $client = new \Adyen\Client();
    $service = new \Adyen\Service\Checkout($client);
    $params = array(
      "amount" => array(
        "currency" => "EUR",
        "value" => 1000
      "reference" => "YOUR_ORDER_NUMBER",
      "paymentMethod" => array(
        "type" => "applepay",
        "applepay.token" => "QWIwMmI0YzAhQlFBQkFnQjMv.."
      "merchantAccount" => "YOUR_MERCHANT_ACCOUNT"
    $result = $service->payments($params);
    #Set your X-API-KEY with the API key from the Customer Area.
    adyen = Adyen.Adyen()
    adyen.client.xapikey = 'YOUR_X-API-KEY'
    result = adyen.checkout.payments({
       'amount': {
          'value': 1000,
          'currency': 'EUR'
       'reference': 'YOUR_ORDER_NUMBER',
       'paymentMethod': {
          'type': 'applepay',
          'applepay.token': 'QWIwMmI0YzAhQlFBQkFnQjMv..'
       'merchantAccount': 'YOUR_MERCHANT_ACCOUNT'
    // Set your X-API-KEY with the API key from the Customer Area.
    var client = new Client ("YOUR_X-API-KEY", Environment.Test);
    var checkout = new Checkout(client);
    var amount = new Model.Checkout.Amount("EUR", 1000);
    var details = new Model.Checkout.DefaultPaymentMethodDetails{
      Type = "applepay",
      ApplePayToken = "QWIwMmI0YzAhQlFBQkFnQjMv.."
    var paymentsRequest = new Model.Checkout.PaymentRequest
      Reference = "YOUR_ORDER_NUMBER",
      Amount = amount,
      MerchantAccount = "YOUR_MERCHANT_ACCOUNT",
      PaymentMethod = details
    var paymentResponse = checkout.Payments(paymentsRequest);
    // Set your X-API-KEY with the API key from the Customer Area.
    const {Client, Config, CheckoutAPI} = require('@adyen/api-library');
    const config = new Config();
    // Set your X-API-KEY with the API key from the Customer Area.
    config.apiKey = '[API_KEY]';
    config.merchantAccount = '[YOUR_MERCHANT_ACCOUNT]';
    const client = new Client({ config });
    const checkout = new CheckoutAPI(client);
        amount: { currency: "EUR", value: 1000 },
        paymentMethod: {
            type: 'applepay',
            applepay.token: 'QWIwMmI0YzAhQlFBQkFnQjMv..'
        reference: "YOUR_ORDER_NUMBER",
        merchantAccount: config.merchantAccount
    }).then(res => res);

    The response contains the result of the payment.

      "pspReference": "881539337151149C",
      "resultCode": "Authorised"

Present the payment result

Use the resultCode that you received in response to your /payments call to present the payment result to your shopper.

The resultCode values you can receive for Apple Pay are:

resultCode Description Action to take
Authorised The payment was successful. Inform the shopper that the payment has been successful.
Refused The payment was refused by the shopper's bank. Ask the shopper to try the payment again using a different payment method.

Recurring payments

To make recurring Apple Pay payments, you first need to create a shopper token and then make subsequent recurring transactions with the token.

Refer to Tokenization for more information and detailed instructions.

Test and go live

Use Apple's test card numbers to test your integration.

Card Type Card number Expiry date CVC/CID
Discover 6011 0009 9446 2780 11/2022 111
Mastercard 5204 2477 5000 1471 11/2022 111
Visa 4761 1200 1000 0492 11/2022 533

For a full list of test cards and instructions how to add these to your test device, see Sandbox testing on Apple's Developer website.

Check the status of an Apple Pay test payment in your Customer Area > Transactions > Payments.

Before you can go live, you need to have the API Clientside Encryption Payments role enabled for your web service user. Check this in your live Customer Area or ask your Admin user to verify.

See also