Skip to main content
You can configure the Apple Pay Component for express checkout to offer your shoppers the option to pay with fewer steps. In the express checkout flow, you request the shopper’s billing and shipping information that can be used to prefill the data, which speeds up the checkout process.

Apple Pay express

Set up Apple Pay express

Requirements-Apple-Pay-Express

Requirements

How-It-Works-Apple-Pay-Express

How it works

To display the option to check out with Apple Pay express on your website:
  1. Create a Document Object Model (DOM) element, placing it where you want to offer express checkout.
  2. Add additional Apple Pay configuration to support express checkout, and get the shopper’s billing and shipping information.
  3. Implement callbacks to handle different parts of the payment flow:
  4. After checking that Apple Pay is available to the shopper, mount the Apple Pay component to the DOM element you created.

Create-Dom-Element-Apple-Pay-Express

Create a DOM element

Create a Document Object Model (DOM) element where you want to implement express checkout. Create a DOM element

Configure-Apple-Pay-Express

Configure Apple Pay to return the shopper’s details

To use express checkout with Apple Pay, you need to include additional configuration parameters in the Apple Pay Component. Apple Pay express configuration

Configure-Shipping-Callback-Apple-Pay-Express

Configure the callback to handle shipping address changes

If the shopper selects a different shipping address than the one you prefilled, handle the shipping address change:
  1. Implement the onShippingContactSelected event handler that receives the ApplePayShippingContactSelectedEvent so that you get updated information when the shopper selects a different shipping address.
  2. Pass the fields from the ApplePayShippingContactUpdate object, including:
Handle shipping address changes

Configure-Shipping-Method-Changes-Callback-Apple-Pay-Express

Configure the callback to handle shipping method changes

If the shopper selects a different shipping method, handle the shipping method change:
  1. Implement the onShippingMethodSelected event handler that receives the ApplePayShippingMethodSelectedEvent.
  2. Pass the fields from the ApplePayShippingMethodUpdate object, including:
Handle shipping method changes

Configure-Shopper-Info-Callback

Configure the callback to get the shopper’s information

Implement the onAuthorized event handler to get the shopper’s information from Apple Pay and implement checks before continuing the payment flow. This is triggered before onSubmit , and must be resolved or rejected to continue the payment flow. Implement onAuthorized

Mount-Apple-Pay-Express

Mount the Component

Check that Apple Pay is available and mount the Component on the DOM element you created: Mount the Component

Test-And-Go-Live-Apple-Pay-Express

Test and go live

Use Apple’s test card numbers to test your integration. 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. When you are ready to accept live payments, follow the steps to go live with your or Adyen’s Apple Pay certificate.

Code-Samples-Apple-Pay-Express

Code samples

Below are the code samples for the steps explained on this page in full. **

HTML

DOM element
**

JavaScript

Component implementation example

See-Also-Apple-Pay-Express

See also