Apple Pay express
Set up Apple Pay expressRequirements-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:- Create a Document Object Model (DOM) element, placing it where you want to offer express checkout.
- Add additional Apple Pay configuration to support express checkout, and get the shopper’s billing and shipping information.
- Implement callbacks to handle different parts of the payment flow:
- 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 elementConfigure-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:-
Implement the
onShippingContactSelectedevent handler that receives the ApplePayShippingContactSelectedEvent so that you get updated information when the shopper selects a different shipping address. -
Pass the fields from the ApplePayShippingContactUpdate object, including:
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:-
Implement the
onShippingMethodSelectedevent handler that receives the ApplePayShippingMethodSelectedEvent. -
Pass the fields from the ApplePayShippingMethodUpdate object, including:
Configure-Shopper-Info-Callback
Configure the callback to get the shopper’s information
Implement theonAuthorized 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