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

# Create Checkout Session

> Create a Stripe checkout session for scenario/collection purchase

Create a Stripe checkout session to enable purchases through your application.
Returns a checkout URL that users can be redirected to.

<Note>
  This endpoint is only available for resellers with appropriate access rights.
</Note>

<ParamField body="product_id" type="string" required>
  The scenario or collection ID to purchase
</ParamField>

<ParamField body="product_type" type="string" required>
  Either "scenario" or "collection"
</ParamField>

<ParamField body="email" type="string" required>
  Customer email for the purchase
</ParamField>

<ParamField body="success_url" type="string" required>
  URL to redirect after successful payment
</ParamField>

<ParamField body="cancel_url" type="string" required>
  URL to redirect if payment is cancelled
</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "product_id": "scenario_abc123",
    "product_type": "scenario",
    "email": "customer@example.com",
    "success_url": "https://yourapp.com/success",
    "cancel_url": "https://yourapp.com/cancel"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "checkout_url": "https://checkout.stripe.com/c/pay/...",
    "session_id": "cs_xxx"
  }
  ```
</ResponseExample>
