Smart upgrade — chooses Checkout Session or direct API based on payment method
Billing
Smart upgrade — chooses Checkout Session or direct API based on payment method
POST /billing/upgrade/
POST
Smart upgrade — chooses Checkout Session or direct API based on payment method
This endpoint requires authentication. Include your Bearer token in the Authorization header.
Description
POST /billing/upgrade/ Validates unpaid invoices first (402 if present), then for paid
plans checks whether the tenant already has a card on file: if not,
creates a Stripe Checkout Session and returns 402 payment_required with data.checkoutUrl; if a payment method
exists (or the target is FREE), performs the plan change directly
via createOrReplaceSubscription with always_invoice proration.
Authorization:
- Required role:
owneronly
Code Examples
Authorizations
JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"
Path Parameters
Example:
"plus_monthly"