---
title: "Create Checkout Session"
method: POST
path: "/api/billing/checkout"
tags: ["Account and billing"]
---

# Create Checkout Session

`POST /api/billing/checkout`

## Request

- Base URL: `https://epw.tools`
- URL: `https://epw.tools/api/billing/checkout`
- Auth: none declared

Create a Stripe Checkout session for purchasing credits.
Requires an API key so we know whose account to top up.
Returns { checkout_url } to redirect the user to.

## Headers

- `X-API-Key` string, nullable

## Request body

- CheckoutRequest
  - `plan` string, required
  - `success_url` string, required
  - `cancel_url` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/epw/apis/epw-tools-api.md) · [All operations](https://skmtc.dev/epw/apis/epw-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/epw/apis/epw-tools-api/revisions/e6b60fc7a6d7?raw)
