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

# Express Checkout

> Put Apple Pay and Google Pay first so mobile customers pay in one tap. Turn it on per checkout session with one field, and optionally hide every other payment method.

![Two iPhones: express checkout under a plan picker with Apple Pay at the top, and the Apple Pay sheet that one tap opens](https://mintcdn.com/dodopayments/GaZZdg6frQRjK_Jm/images/express-checkout/hero.png?fit=max\&auto=format\&n=GaZZdg6frQRjK_Jm\&q=85\&s=aa978b416f8e6b9c0d77ecf02af3586e)

Express checkout puts Apple Pay and Google Pay at the top of the checkout, full width, so a customer with a card in their wallet pays with one tap. The wallet sheet supplies the email, the name, and the billing address, so the customer types nothing. The card form and every other payment method stay one tap below, or you can hide them.

You turn express checkout on for each checkout session with `customization.checkout_variant`. An express session always uses the [single page checkout](https://docs.dodopayments.com/features/single-page-checkout.md).

> [card] [Checkout Sessions API](https://docs.dodopayments.com/api-reference/checkout-sessions/create.md)
>
> Create a checkout session with `customization.checkout_variant`.

> [card] [Inline Checkout](https://docs.dodopayments.com/developer-resources/inline-checkout.md)
>
> Embed checkout directly in your page.

> [card] [Single Page Checkout](https://docs.dodopayments.com/features/single-page-checkout.md)
>
> The one-page flow that express checkout builds on.

> [card] [Digital Wallets](https://docs.dodopayments.com/features/payment-methods/digital-wallets.md)
>
> Set up Apple Pay and Google Pay.

## Turn On Express Checkout

Set `customization.checkout_variant` to `"express"` when you create the checkout session. The examples use a `client` set up as in the [Checkout Sessions guide](https://docs.dodopayments.com/developer-resources/checkout-session.md#creating-your-first-checkout-session):

```typescript Node.js theme={null}
const session = await client.checkoutSessions.create({
  product_cart: [{ product_id: 'pdt_123', quantity: 1 }],
  customization: {
    checkout_variant: 'express'
  },
  return_url: 'https://yoursite.com/checkout/success'
});
```

```python Python theme={null}
session = client.checkout_sessions.create(
    product_cart=[{"product_id": "pdt_123", "quantity": 1}],
    customization={"checkout_variant": "express"},
    return_url="https://yoursite.com/checkout/success",
)
```

```bash cURL theme={null}
curl -X POST https://test.dodopayments.com/checkouts \
  -H "Authorization: Bearer $DODO_PAYMENTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "product_cart": [{ "product_id": "pdt_123", "quantity": 1 }],
    "customization": { "checkout_variant": "express" },
    "return_url": "https://yoursite.com/checkout/success"
  }'
```

Send the customer to the `checkout_url` in the response, or pass it to [inline checkout](#embed-express-checkout-on-your-page).

| Field | Values | Default |
| - | - | - |
| `customization.checkout_variant` | `"standard"` or `"express"` | `"standard"` |
| `customization.show_non_express_payment_methods` | `true` or `false` | `true` |

* An express session always uses the single page checkout, even if you set `feature_flags.single_page` to `false`.

## What Customers See

### On a Phone

Express checkout is built for phones. On a touch device the page shows only what a wallet customer needs:

![Three phones: an iPhone with Apple Pay, a Pixel with Google Pay, and an iPhone with Card and other methods opened](https://mintcdn.com/dodopayments/GaZZdg6frQRjK_Jm/images/express-checkout/phones.png?fit=max\&auto=format\&n=GaZZdg6frQRjK_Jm\&q=85\&s=d52d86880fc926f2c66191078aaa0443)

* **The wallet for the device** sits at the top: Apple Pay on an iPhone, Google Pay on Android. Each wallet shows only where the device and browser support it, and Safari shows Apple Pay only.
* **Card and other methods** keeps the email field and the full payment form folded below the wallets. One tap opens them in place.
* **A shorter footer** fits on one line. For subscriptions, the recurring-charge notice opens from **Terms**.

### On a Desktop

On a desktop or laptop, express checkout keeps the wallets at the top and shows the standard form below them: the **OR** divider, the email field, the payment methods, and the full footer.

![Express checkout on a desktop: order summary on the left; Apple Pay and Google Pay, the email field, and the payment methods on the right](https://mintcdn.com/dodopayments/GaZZdg6frQRjK_Jm/images/express-checkout/desktop.png?fit=max\&auto=format\&n=GaZZdg6frQRjK_Jm\&q=85\&s=9ba09b1d62000da0970dcfc10a29b75a)

## Show Only Wallets

To hide the email field and every payment method except the wallets, set `show_non_express_payment_methods` to `false`:

```typescript Node.js theme={null}
const session = await client.checkoutSessions.create({
  product_cart: [{ product_id: 'pdt_123', quantity: 1 }],
  customization: {
    checkout_variant: 'express',
    show_non_express_payment_methods: false
  }
});
```

```python Python theme={null}
session = client.checkout_sessions.create(
    product_cart=[{"product_id": "pdt_123", "quantity": 1}],
    customization={
        "checkout_variant": "express",
        "show_non_express_payment_methods": False,
    },
)
```

![Express checkout on an iPhone with only Apple Pay and the footer](https://mintcdn.com/dodopayments/GaZZdg6frQRjK_Jm/images/express-checkout/iphone-wallets-only.png?fit=max\&auto=format\&n=GaZZdg6frQRjK_Jm\&q=85\&s=1c55549f1179a64c5c216111219e635e)

Wallets only

A customer without Apple Pay or Google Pay can still pay. If no wallet is available within 3 seconds, the checkout shows the full form instead and sends `checkout.express_fallback` to your page, with the reason in `data.message.reason`:

| Reason | Meaning |
| - | - |
| `no_wallets` | The customer's device or browser shows neither Apple Pay nor Google Pay. |
| `load_error` | The wallet buttons failed to load. |
| `timeout` | No wallet was ready within 3 seconds. |

The SDK passes `checkout.express_fallback` to `onEvent` from `dodopayments-checkout` 2.2.0.

## Fields the Wallet Cannot Fill

The wallet sheet supplies the email, the name, and the billing address. Anything else the session needs goes above the wallets, and the wallet sheet stays closed until it is complete:

* A required phone number.
* Your [custom fields](https://docs.dodopayments.com/developer-resources/checkout-session.md#collecting-custom-fields). An optional custom field can stay empty.
* Your terms checkboxes, when the session requires terms acceptance.
* The business name and tax ID, when the session requires a tax ID.

## Embed Express Checkout on Your Page

Express checkout works with [inline checkout](https://docs.dodopayments.com/developer-resources/inline-checkout.md) and [overlay checkout](https://docs.dodopayments.com/developer-resources/overlay-checkout.md). For a mobile purchase page, inline checkout under your plan picker works best.

Keep the checkout hidden until it sends `checkout.form_ready`, and show your own loading state until then. The customer then sees the finished checkout appear at once, with the wallets already in place.

```html Inline express checkout expandable theme={null}
<div id="checkout-loading">Loading checkout…</div>
<div id="checkout-container" style="visibility: hidden; height: 0; overflow: hidden"></div>

<script src="https://cdn.jsdelivr.net/npm/dodopayments-checkout@latest/dist/index.js"></script>
<script>
  const { DodoPayments } = DodoPaymentsCheckout;

  DodoPayments.Initialize({
    mode: "live",
    displayType: "inline",
    onEvent: (event) => {
      if (event.event_type === "checkout.form_ready") {
        document.getElementById("checkout-loading").hidden = true;
        document.getElementById("checkout-container").removeAttribute("style");
      }
    },
  });

  // checkoutUrl comes from a checkout session created with
  // customization.checkout_variant: "express"
  DodoPayments.Checkout.open({ checkoutUrl, elementId: "checkout-container" });
</script>
```

### Choose the Footer

The `compactFooter` option in `dodopayments-checkout` 2.2.0 and later sets the footer for an embedded checkout:

```javascript theme={null}
DodoPayments.Checkout.open({
  checkoutUrl,
  elementId: "checkout-container",
  options: { compactFooter: true },
});
```

| `compactFooter` | Footer |
| - | - |
| `true` | The one-line footer on every device |
| `false` | The full footer on every device, also on a phone |
| Not set | Express checkout on a phone shows the one-line footer; everything else shows the full footer |

> [!NOTE]
>
> Apple Pay in an embedded checkout needs your domain verified for Apple Pay. See [Quick Setup for Apple Pay](https://docs.dodopayments.com/developer-resources/inline-checkout.md#quick-setup-for-apple-pay). Apple Pay is not available in overlay checkout, so an overlay express checkout shows Google Pay only.

## Works With Your Checkout Settings

* **Tax.** The Apple Pay and Google Pay sheets show the total for the card's billing address before the customer approves.
* **Locked country.** If you set the billing country and `allow_customer_editing_country` is `false`, a wallet card billed in another country cannot pay. The checkout asks for a card from your country.
* **Subscriptions and add-ons.** Express checkout works for subscriptions, trials, and add-ons. A free trial that starts without a card shows no wallets.
* **Discount codes.** In inline checkout, the discount code field sits above the wallets, and the wallet total updates after a code is applied.
* **Saved payment methods.** Returning customers see their saved cards below the wallets.
* **Look and language.** Tabs or accordion layout, light or dark theme, and every checkout language, including right-to-left languages.

> [card] [Single Page Checkout](https://docs.dodopayments.com/features/single-page-checkout.md)
>
> How the one-page checkout collects details and prices the order.

> [card] [Inline Checkout](https://docs.dodopayments.com/developer-resources/inline-checkout.md)
>
> Events, sizing, and options for embedded checkout.


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