Start a self-serve Community -> Cloud upgrade
Changed onOwner-only (bunkai_is_workspace_owner) — an admin/member/viewer is rejected before any Stripe call. Idempotency-Key is REQUIRED (ADR-0002). Plan activation happens asynchronously via the Stripe webhook once payment is confirmed — this endpoint never writes workspaces.plan itself. At most one open Checkout Session may exist per workspace at a time (a partial unique index backs this); a second concurrent request either reuses the existing session's URL or answers 409.
Request
- Base URL: http://localhost:3000
- URL: http://localhost:3000/api/v1/workspaces/{id}/billing/checkout
- Auth: one of:
- API key in cookie sb-fmbpikzpkafptqximhxn-auth-token
- HTTP bearer
Path parameters
Headers
Required. 8–128 chars, [a-zA-Z0-9_-]. A replay with the same key and payload returns the stored response; the same key with a different payload returns 409 conflict. This is the HTTP-level replay guard — distinct from the DB-level one-open-session-per-workspace guard that covers two different tabs/keys racing for the same workspace.
Request body
Response
Checkout Session URL (freshly created, or replayed/reused).
Changes
- info
added the non-success response with the status
- info
- info
removed the non-success response with the status
- info