> ## 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.

**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.

**1. Create an order**

Create an order using the [Create Order API](https://www.cashfree.com/docs/api-reference/payments/latest/orders/create-order.md):

```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"
    }
  }'
```

**2. Redirect to checkout**

Redirect your customers to the checkout address returned in the order creation response. Apple Pay is automatically displayed for eligible customers.

**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

**1. Go to Payment Methods settings**

Log in to the [Merchant Dashboard](https://merchant.cashfree.com/auth/login) and navigate to **Settings > Payment Methods**.

**2. Open Apple Pay settings**

Navigate to **Payment Methods > Apple Pay > Pop-Up/In-Line Checkout**.

**3. Download the domain verification file**

Select **Download Domain Verification File** on the Merchant Dashboard.

**4. 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
```

**5. Enter your domains**

Enter each domain where you want to enable Apple Pay as a payment option.

**6. 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.

> [!NOTE]
>
> Apple Pay will not load on pop-up or in-line checkout until the domain verification file is hosted correctly.

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

Related topics

<ul>
  <li>[Create Order API](https://www.cashfree.com/docs/api-reference/payments/latest/orders/create-order.md)</li>
  <li>[Apple Pay Overview](https://www.cashfree.com/docs/payments/manage/payment-methods/credit-and-debit-cards/apple-pay/overview.md)</li>
  <li>[Apple Pay Custom Checkout](https://www.cashfree.com/docs/payments/manage/payment-methods/credit-and-debit-cards/apple-pay/custom-checkout/overview.md)</li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.