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

# Checkout API

> Create a Stripe checkout session for a regular plan

Called automatically by the embed widget when a user clicks "Choose Plan". You typically don't call this directly.

## Endpoint

```
POST /api/stripe/checkout
```

## Body

<ParamField body="planId" type="number" required>
  The ID of the plan
</ParamField>

<ParamField body="shareId" type="string" required>
  Your project's Share ID
</ParamField>

<ParamField body="email" type="string">
  Customer email (pre-fills on Stripe checkout)
</ParamField>

<ParamField body="billingInterval" type="string">
  `"month"` or `"year"`
</ParamField>

## Response

```json theme={null}
{
  "url": "https://checkout.stripe.com/c/pay/cs_live_..."
}
```

The `url` is the Stripe Checkout page. The embed widget redirects the user there automatically.
