Skip to main content
To enable Apple Pay on your site, follow these steps using the Crossmint Developer Console.

Prerequisites

  1. HTTPS Hosting: Your site must be hosted on HTTPS to ensure secure transactions.
  2. Crossmint Account: You need an active Crossmint developer account.

Setup Instructions

Step 1: Download the Verification File

  1. Go to the Apple Pay Domains page in the Crossmint Console.
  2. Click Download file to get the Apple Developer Merchant ID Domain Association file.

Step 2: Host the Verification File

Host the downloaded file on your server at the following path:
https://[your-domain]/.well-known/apple-developer-merchantid-domain-association
Option 1: Using the Public Folder
  1. Create the .well-known folder inside your public directory.
  2. Place the downloaded file in public/.well-known/ with the filename apple-developer-merchantid-domain-association (no extension).
Option 2: Using a Route
  1. Create a folder at app/.well-known/apple-developer-merchantid-domain-association/
  2. Add a route.ts file with the following content:
route.ts
import { NextResponse } from "next/server";

export async function GET() {
    return new NextResponse("PASTE_FILE_CONTENT_HERE", {
        headers: {
            "Content-Type": "text/plain",
        },
    });
}
Replace PASTE_FILE_CONTENT_HERE with the content of the downloaded verification file.
  1. Create the .well-known folder inside your public directory.
  2. Place the downloaded file in public/.well-known/ with the filename apple-developer-merchantid-domain-association (no extension).
  1. Create the .well-known folder inside your public directory.
  2. Place the downloaded file in public/.well-known/ with the filename apple-developer-merchantid-domain-association (no extension).

Step 3: Verify Your Domain

  1. Return to the Apple Pay Domains page in the Crossmint Console.
  2. Enter your domain (e.g., example.com or checkout.example.com) in the input field.
  3. Click Verify domain.
If verification succeeds, your domain will appear in the list of registered domains and Apple Pay will be enabled for that domain.
If verification fails, ensure the file is publicly accessible at the correct path. You can test by visiting https://your-domain/.well-known/apple-developer-merchantid-domain-association in your browser.

Local Testing

Using ngrok is recommended for local testing. Ngrok allows you to expose your local server to the internet securely.
  1. Start ngrok with a fixed domain if possible for consistent testing.
  2. Host the verification file on your local server.
  3. Register the ngrok domain in the Crossmint Console.
  4. Test Apple Pay on Safari (macOS) or any iOS device.

For further assistance, please contact our support team.