---
title: "Stripe-Checkout-Session starten"
method: POST
path: "/api/checkout"
tags: ["Tenant"]
---

# Stripe-Checkout-Session starten

`POST /api/checkout`

## Request

- Base URL: `https://knowmind.de`
- URL: `https://knowmind.de/api/checkout`
- Auth: API key in cookie `authjs.session-token`

Eingeloggter User wechselt von Free auf einen Bezahltarif. Liefert die Stripe-Checkout-URL. Nach erfolgreichem Checkout setzt der Webhook `stripe-webhook` den Tenant-Plan und schreibt Customer- und Subscription-ID in die billing-Tabelle.

## Request body

- object
  - `plan` 'pro' | 'team' | 'business' | 'business_api', required
  - `billing` 'monthly' | 'yearly'

## Response `200`

Checkout-URL

## Other responses

- `429`: Rate-Limit überschritten
- `503`: Stripe nicht konfiguriert

---

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