---
title: "Create a Stripe Embedded Checkout Session for the given tier. Lazily creates the user's Stripe customer on first call."
method: POST
path: "/api/billing/checkout"
tags: ["billing"]
---

# Create a Stripe Embedded Checkout Session for the given tier. Lazily creates the user's Stripe customer on first call.

`POST /api/billing/checkout`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body

- CreateCheckoutRequest
  - `tier` string, required: Tier slug: "base" | "mid" | "high".

## Response `200`

Checkout session created

- CreateCheckoutResponse
  - `client_secret` string, required: Pass to the Stripe Embedded Checkout React component.

## Other responses

- `400`: Invalid tier
- `401`: Not authenticated
- `409`: Already has an active subscription
- `500`: Stripe API error

## Changes

- **2026-07-16** `e75f7cb807f2`: 1 info
  - added the non-success response with the status `409`
- **2026-05-05** `68e179aba81a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scholia-study/apis/scholia-api/changes/api/billing/checkout/post.md)

---

[API](https://skmtc.dev/scholia-study/apis/scholia-api.md) - [All operations](https://skmtc.dev/scholia-study/apis/scholia-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scholia-study/apis/scholia-api/revisions/684b3751bfd3?raw)
