Apple Pay on web without Embed
It is possible to use Apple Pay on the web without our SDK. To learn how to integrate Apple Pay we recommend following Apple’s documentation.
The steps below will highlight the basics and focus on the interaction with our API. A full code sample is available that shows this integration in action.
About this integration
Similar to our standard Embed integration, there is minimal configuration to get set up to process Apple Pay on the web. There is no need to sign up for an Apple Developer account with this integration.
- Upload our Domain Association File to your website.
- Enable Apple Pay in your merchant dashboard.
Additionally, you will then need to implement the following.
- Render an Apple Pay button.
- Handle the click of the button.
- Verify the Apple Pay session.
- Catch the Apple Pay token and pass it to our API for processing.
Enable Apple Pay
To enable Apple Pay, head over to your dashboard and then go to Connections -> Catalog -> Apple Pay.
Next, complete and submit the form to create a new Apple Pay service.
Registering a domain
To process Apple Pay via the web you will need to register all the domains where the buyer can checkout. In order to do this, navigate to your Apple Pay service via the dashboard, Connections -> Apple Pay -> Domains -> Add domain name.
Domain Association File
Before submitting a domain name, please download the Domain Association File from the dashboard and upload it to every domain you wish to support.
The file needs to be added to every domain in a predefined location.
This file is checked by Apple in the production environment to verify that you have granted us permission to perform Apple Pay transactions on your dashboard.
Integrate Apple Pay
Render an Apple Pay button
An Apple Pay button can be displayed and customized with Apple specific CSS.
Handle button click
When a button is clicked, start an Apple Pay Session.
Verify session
Next, this is the bit that’s specific to our API. Make an API call to our Apple Pay session endpoint to verify the Apple Pay session for your domain. This checks if we are allowed to accept Apple Pay on your domain.
For this to work it’s important to register the domain your domain for use with Apple Pay in our dashboard.
When using a real card in a sandbox environment the validation URL will be rejected by the
POST /digital-wallets/apple/session
endpoint. Please only use test cards in the sandbox environment.
Create a transaction
Finally, once the Apple Pay transaction has been authorized by Apple, create a transaction with our API.
This API call could be made in your frontend code, or the token could be sent to your backend for processing.
Common issues
Was this page helpful?