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 iOS Drop-in integration.

On this page, you can find additional configuration for adding Apple Pay to your Drop-in integration.

Before you begin

This page assumes you've already built a Drop-in integration.

Set up Apple Pay

  1. Set up your server for secure communication with Apple Pay.
  2. Enable Apple Pay using your own Apple Developer account and certificate.

API reference

You don't need to send additional fields for Apple Pay. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:

If you run into an error, refer to Handle Apple Pay errors.

Drop-in configuration

When you configure Drop-in, you need additional configuration for Apple Pay.

If your integration uses iOS Drop-in v5.0.0 or later, include the following when you configure Drop-in:
Parameter name Description
merchantIdentifier Your Apple Pay merchant identifier.
requiredBillingContactFields
Ignored on iOS 10 and later.
The fields required for the billing contact.
requiredShippingContactFields
Ignored on iOS 10 and later.
The fields required for the shipping contact.
//Initialize a Drop-in configuration object.
let dropInConfiguration = DropInComponent.Configuration()
//Set configuration for Apple Pay.
dropInConfiguration.applePay = .init(payment: applePayment,
                               merchantIdentifier: YOUR_APPLE_PAY_MERCHANT_ID,
                               requiredBillingContactFields: ... , //Your required billing contact fields.
                               requiredShippingContactFields = ... ) //Your required shipping contact fields.

Optional configuration

If your integration uses iOS Drop-in v5.0.0 or later, you can optionally include the following when you configure the Drop-in:
Parameter name Description
billingContact A prefilled billing address.
shippingContact A prefilled shipping address.
allowOnboarding Set to true to let the shopper add cards to their Apple Pay wallet if they haven't already done so. Otherwise, the shopper can't use Apple Pay.
Default: false.
shippingType The type of shipping displayed, for example Pick Up, Ship To, or Deliver To. This is localized.
Default: PKShippingTypeShipping = .shipping.
allowShippingContact Set to false to prevent the shopper from changing the shipping contact field before showing the payment form.
Default: true.
shippingMethods An array of supported shipping methods.
applicationData Additional information that you provide about the payment request. For example, an order number or cart identifier.
This is signed and included in the resulting PKPaymentToken.
supportedCountries Only allow payments from cards issued in specific countries. This is a list of ISO 3166 country codes.
supportsCouponCode Set to true to let the shopper enter a coupon code which gets validated.
Default: false.
couponCode A coupon code that has already been applied to the payment request.

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 TypeCard numberExpiry dateCVC/CID
Discover6011 0009 9446 278011/2022111
Mastercard5204 2452 5000 148811/2022111
Visa4761 1200 1000 049211/2022533

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.

Going live

To process live Apple Pay payments, your API credential needs to have the API Clientside Encryption Payments role. You can check this in your live Customer Area or ask your Admin user to verify.

Make sure you follow Apple's guidelines on:

  1. Enable Apple Pay on your Apple Pay Developer account for your live merchant identifier.
  2. Set up your server for secure communication with Apple Pay.

See also