> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Apple Pay

> Enable Apple Pay on your website for onramp transactions

<Note>This guide covers Apple Pay for **web** integrations (Safari on macOS and iOS only). For native iOS apps, Apple Pay is supported automatically via the Swift SDK — see the [Swift Quickstart](/onramp/quickstarts/swift).</Note>

To enable Apple Pay for onramp transactions on your website, you need to verify your domain with Apple through the Crossmint Developer Console. This is a one-time setup per domain.

## Prerequisites

1. **HTTPS hosting** — your site must be served over HTTPS.
2. **Crossmint account** — you need an active Crossmint developer account.
3. **Working onramp integration** — complete a [quickstart](/onramp/quickstarts/react) first.

## Setup Instructions

<Steps>
  <Step title="Download the Verification File">
    Go to the <a href="https://www.crossmint.com/console/apple-pay-domains" target="_blank">Apple Pay Domains</a> page in the Crossmint Console and click **Download file** to get the Apple Developer Merchant ID Domain Association file.
  </Step>

  <Step title="Host the Verification File">
    Host the downloaded file on your server at the following path:

    ```text theme={null}
    https://YOUR_DOMAIN/.well-known/apple-developer-merchantid-domain-association
    ```

    <Accordion title="Example: Next.js App Router">
      **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:

      ```typescript route.ts theme={null}
      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.
    </Accordion>

    <Accordion title="Example: Next.js Page Router">
      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).
    </Accordion>

    <Accordion title="Example: Vite">
      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).
    </Accordion>
  </Step>

  <Step title="Verify Your Domain">
    1. Return to the <a href="https://www.crossmint.com/console/apple-pay-domains" target="_blank">Apple Pay Domains</a> 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 available as a payment method in the onramp checkout.

    <Note>
      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.
    </Note>
  </Step>
</Steps>

## Enabling Apple Pay in the Checkout Component

Once your domain is verified, enable Apple Pay by setting `applePay: true` in the payment configuration:

```jsx theme={null}
<CrossmintEmbeddedCheckout
    orderId={order.orderId}
    clientSecret={order.clientSecret}
    payment={{
        crypto: { enabled: false },
        fiat: {
            enabled: true,
            allowedMethods: {
                card: true,
                applePay: true,
                googlePay: false,
            },
        },
    }}
/>
```

## Local Testing

Using <a href="https://ngrok.com/" target="_blank">ngrok</a> is recommended for local testing:

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.
