---
title: "Create Checkout"
method: POST
path: "/api/payment/create-checkout"
---

# Create Checkout

`POST /api/payment/create-checkout`

Hosted setup-mode Checkout Session — adblock fallback.

Used when ``js.stripe.com`` is blocked and the inline Payment Element
can't load. Collects Card on File ONLY: ``mode='setup'``, no line
items, no Subscription. Completion fires ``setup_intent.succeeded``,
which runs the same Layer 2 / Layer 3 / grant flow as the inline
path — single source of truth lives in the webhook.

``setup_intent_data.metadata.device_id`` carries the device into the
webhook so the safety-net grant can route without a customer→device
DB lookup, matching the inline flow's ``SetupIntent.create`` metadata.

## Request body

- HostedCheckoutRequest
  - `device_id` string, required
  - `success_url` string, required
  - `cancel_url` string, required
  - `utm_source` string
  - `utm_medium` string
  - `utm_campaign` string
  - `ref_code` string
  - `fbp` string
  - `fbc` string
  - `fbclid` string
  - `rdt_cid` string
  - `auto_recharge` boolean
  - `domain` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/explee/apis/explee-api.md) · [All operations](https://skmtc.dev/explee/apis/explee-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/explee/explee-api/revisions/f169bc6e9447/schema)
