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

# Create Hosted Checkout sessions

> Create, list, and retrieve payment sessions hosted by SimplePay.

Hosted Checkout keeps sensitive payment collection outside your application. Your backend creates a session and receives its public SimplePay URL.

## Select the amount source

Send exactly one option:

* `manual_amount`: amount in the currency's minor unit
* `catalog_line_item`: snapshot generated by Digital Catalog

Do not send both fields.

## Create a session

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -sS -X POST "$SIMPLEPAY_API_BASE/v1/hosted-checkout/sessions" \
  -H "Authorization: Bearer $SIMPLEPAY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order_2001_checkout_v1" \
  --data '{
    "manual_amount": 149900,
    "currency": "mxn",
    "payment_method_types": ["card", "spei", "oxxo"],
    "metadata": {"order_id": "order_2001"}
  }'
```

Store `id`, `public_reference`, `url`, amount, currency, and your order reference.

The redirect is a user experience signal, not financial confirmation. Process a webhook or perform an authenticated read.
