Create a Stripe Checkout session
Opens a Checkout session for a credit top-up or a subscription. Credits are granted by the
plan definition (credits on the Stripe Price), never derived from the amount
paid — the same pack may cost €100 here and $120 there for the same credit amount.
Minimum role: owner.
Authorizations
Short-lived JWT issued by the CarHub auth service (Better Auth), verified against its
JWKS. Claims: sub (user), org_id (active organisation) and role
(owner | admin | member). Used by the dashboard for /mgmt/v1/… only — it is never
accepted on /v1/….
Headers
Client-generated key (a UUID is ideal) making this POST safe to retry. The first request
is executed and its response stored for 24 h; any replay with the same key returns that
stored response with Idempotent-Replayed: true and bills nothing. Reusing a key with a
different payload is a 409 idempotency_key_reuse.
8 - 255Body
top_up adds money once; subscription starts a recurring plan.
top_up, subscription Identifier of the pack or plan, resolved against the price book of your billing country.
"pack_10k"
1 <= x <= 100Response
Session created; redirect the browser to url.