Direct integration of Apple Pay
Beside payments information, Apple Pay allows you to get the billing and shipping addresses from the shopper too. This enables a fast and frictionless checkout.
With the direct integration, you are responsible for implementing Apple's JS APIs. Mollie will provide API endpoints needed by the JS APIs and the ability to send the encrypted Apple Pay Payment Token when creating a payment.
You do not need to join the Apple Developer Program for this integration.
Follow these steps to offer Apple Pay in your own checkout:
Prepare your server
Your checkout must be served over HTTPS. Up to date TLS ciphers are required. For more information, see Apple's documentation on setting up your server.
Apple Pay requires you to place a domain validation file on the domain you want to use the Apple Pay JS APIs on. The presence and validity of this file will be validated by Apple.
Download the domain validation file
and place it on your server at
Check if Apple Pay is available on the device
If Apple Pay is available on the device, you should display the Apple Pay Buttons.
Create an Apple Pay Session
When the shopper taps or clicks the Apple Pay Button, you should create an Apple Pay Session. This specifies all the information you want to display to the shopper and details on the payment.
Providing merchant validation
Please see Apple's documentation on providing merchant validation for details.
Instead of using Apple's API, you must use a :doc:`dedicated endpoint in the Mollie API </reference/v2/wallets-api/request-apple-pay-payment-session>`.
Send the Apple Pay Payment Token to Mollie
Once the shopper has authorized the payment, you will receive the Apple Pay Payment object. You must then encode the object's
token property to JSON and add the JSON as the
applePayPaymentToken parameter when invoking the
:doc:`Create Payment API </reference/v2/payments-api/create-payment>`.