---
title: "Create a Stripe Checkout session"
method: POST
path: "/api/v1/billing/checkout"
tags: ["Billing", "Billing"]
---

# Create a Stripe Checkout session

`POST /api/v1/billing/checkout`

## Request

- Base URL: `https://fermi.kromatic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://fermi.kromatic.com/api/v1/billing/checkout`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Start a Stripe Checkout flow to purchase credits. Returns a checkout_url to redirect the user (or open in a browser). The card is saved for future off-session purchases.

## Request body

- CheckoutRequest
  - `credits` integer, required: Number of credits to purchase
  - `success_url` string, nullable
  - `cancel_url` string, nullable

## Response `200`

Successful Response

- CheckoutResponse
  - `checkout_url` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kromatic/apis/fermi.md) · [All operations](https://skmtc.dev/kromatic/apis/fermi/llms.txt) · [OpenAPI document](https://skmtc.dev/kromatic/apis/fermi/revisions/75a37f8067c2?raw)
