Apple Pay Integration Guide
Learn how to enable Apple Pay on your site for Checkout
To enable Apple Pay on your site, follow these steps:
Prerequisites
- HTTPS Hosting: Your site must be hosted on HTTPS to ensure secure transactions.
- Domain Validation: Provide your domain to our support team for validation.
Download the Apple Validation File
Before proceeding, download the Apple Developer Merchant ID Domain Association File:
Download the Apple Developer Merchant ID Domain Association File
Setup Instructions
Step 1: Host the Apple Developer Merchant ID Domain Association File
You need to host the following endpoint on your server and return the Apple .txt
validation file as plain text:
Example Setup Using Next.js App Router
Option 1: Using the Public Folder
-
Create a Public Folder: In your Next.js project, create the
.well-known
folder inside your public directory. -
Add the Validation File: Paste the Apple verification txt with no extension in
public/.well-known/
.Filename:
apple-developer-merchantid-domain-association
Option 2: Using a Route
-
Create the Route Structure: In your Next.js project, create a folder at:
Path:
app/.well-known/apple-developer-merchantid-domain-association/
-
Add a
route.ts
File: Inside the folder, create aroute.ts
file with the following content:route.tsReplace
'TXT-CONTENT'
with the actual content of your Apple validation file.
Example Setup Using Next.js Page Router
-
Create a Public Folder: In your Next.js project, create the
.well-known
folder inside your public directory. -
Add the Validation File: Paste the Apple verification txt with no extension in
public/.well-known/
.Filename:
apple-developer-merchantid-domain-association
Example Setup Using Vite
-
Create a Public Folder: In your Vite project, create the
.well-known
folder inside your public directory. -
Add the Validation File: Paste the Apple verification txt with no extension in
public/.well-known/
.Filename:
apple-developer-merchantid-domain-association
Step 2: Test Apple Pay
Test Apple Pay on Safari (macOS) or any iOS device once setup is complete.
Local Testing
We recommend using ngrok to test your setup locally. Ngrok allows you to expose your local server to the internet securely. If possible, use a fixed domain with ngrok for consistent testing.
For further assistance, please contact our support team.