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

# Apple Pay Hosted Checkout

> Enable Apple Pay on Cashfree-hosted checkout through both redirect checkout or pop-up and in-line checkout on your website or app.

Cashfree-hosted checkout uses Cashfree's pre-built checkout page, where customers can select Apple Pay as a payment option. Depending on how you render the checkout, choose one of the following flows.

<Tabs>
  <Tab title="Redirect checkout">
    This is the quickest way to enable Apple Pay for your customers. If you redirect to Cashfree-hosted checkout on `api.cashfree.com`, no additional integration work is required. Apple Pay is automatically displayed for eligible customers, and Cashfree ensures seamless processing of Apple Pay transactions.

    Redirect checkout offers the following benefits:

    * Minimal development effort: No Apple Pay-specific coding required.
    * Automatic updates: New Apple Pay features are automatically available.
    * Reduced maintenance: Cashfree manages certificates and compliance.
    * Enhanced security: All sensitive data handled by Cashfree's PCI-compliant infrastructure.

    ### Implement redirect checkout

    Follow these steps to implement Apple Pay with redirect checkout.

    <Steps>
      <Step title="Create an order">
        Create an order using the [Create Order API](/docs/api-reference/payments/latest/orders/create-order):

        ```bash theme={"dark"}
        curl -X POST 'https://api.cashfree.com/pg/orders' \
          -H 'Content-Type: application/json' \
          -H 'x-api-version: 2023-08-01' \
          -H 'x-client-id: <CLIENT_ID>' \
          -H 'x-client-secret: <CLIENT_SECRET>' \
          -d '{
            "order_id": "order_001",
            "order_amount": 100.00,
            "order_currency": "INR",
            "customer_details": {
              "customer_id": "customer_001",
              "customer_name": "John Doe",
              "customer_email": "john@example.com",
              "customer_phone": "+919876543210"
            }
          }'
        ```
      </Step>

      <Step title="Redirect to checkout">
        Redirect your customers to the checkout address returned in the order creation response. Apple Pay is automatically displayed for eligible customers.
      </Step>
    </Steps>
  </Tab>

  <Tab title="Pop-up / in-line checkout">
    Since pop-up and in-line checkout render on your own domain, minimal setup is required to make Apple Pay work.

    ### Enable pop-up and in-line checkout

    <Steps>
      <Step title="Go to Payment Methods settings">
        Log in to the [Merchant Dashboard](https://merchant.cashfree.com/auth/login) and navigate to **Settings > Payment Methods**.
      </Step>

      <Step title="Open Apple Pay settings">
        Navigate to **Payment Methods > Apple Pay > Pop-Up/In-Line Checkout**.
      </Step>

      <Step title="Download the domain verification file">
        Select **Download Domain Verification File** on the Merchant Dashboard.
      </Step>

      <Step title="Host the domain verification file">
        Host the downloaded file at the following exact path on your domain:

        ```text theme={"dark"}
        https://<YOUR_DOMAIN>/.well-known/apple-developer-merchantid-domain-association
        ```
      </Step>

      <Step title="Enter your domains">
        Enter each domain where you want to enable Apple Pay as a payment option.
      </Step>

      <Step title="Activate">
        Select **Activate**. Cashfree registers your domains with Apple. On successful registration, Apple Pay gets enabled for you and is automatically displayed for eligible customers.
      </Step>
    </Steps>

    <Note>
      Apple Pay will not load on pop-up or in-line checkout until the domain verification file is hosted correctly.
    </Note>
  </Tab>
</Tabs>

See [Compatibility](/docs/payments/manage/payment-methods/credit-and-debit-cards/apple-pay/overview#compatibility) for the full list.

<div class="hidden" data-table-of-contents="bottom">
  <p class="mt-4 font-medium flex items-center gap-2 related-docs-heading">
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="w-4 h-4">
      <path d="M3 4h7a2 2 0 0 1 2 2v13a2 2 0 0-2-2H3z" />

      <path d="M21 4h-7a2 2 0 0 0-2 2v13a2 2 0 0 1 2-2h7z" />
    </svg>

    <span>Related topics</span>
  </p>

  <ul>
    <li><a href="/docs/api-reference/payments/latest/orders/create-order">Create Order API</a></li>
    <li><a href="/docs/payments/manage/payment-methods/credit-and-debit-cards/apple-pay/overview">Apple Pay Overview</a></li>
    <li><a href="/docs/payments/manage/payment-methods/credit-and-debit-cards/apple-pay/custom-checkout/overview">Apple Pay Custom Checkout</a></li>
  </ul>
</div>
