Overview
Billing
Section titled “Billing”Subscription plans, Stripe checkout + Billing Portal entry-points, and the in-app cancel / reactivate lifecycle. Plan limits + prices live in the database, not in code — GET /api/plans/ is the source of truth for what’s available (public, no auth).
Lifecycle, in order:
GET /api/plans/→ the catalog (price, quota, seat / client ceilings,display_mode).GET /api/subscriptions/current/→ the team’s live subscription (status, embedded plan snapshot, period dates). Every team has one — Free is the signup default.POST /api/billing/checkout/→ Stripe Checkout URL for a new paid sub (Free → paid). Plan switches between paid tiers go throughGET /api/billing/portal/update-plan/?price=<id>instead (409 tells you which).GET /api/billing/portal/→ the Stripe Billing Portal for payment-method + invoice management.POST /api/billing/subscription/{cancel,reactivate}/→ in-app cancel-at-period-end + undo.
These endpoints are owner-scoped and tied to the signed-in user (JWT) — not part of the partner API-key surface. The Stripe webhook receiver is internal (HMAC-signed) and is not part of this documented API.