Skip to main content
PUT
Change subscription plan (recommended entry point for all plan changes)
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

PUT /billing/stripe/change-plan The single supported path for Free→Paid, Paid→Paid, upgrades, and downgrades. Ensures a Stripe customer exists, resolves the new price via createOrReplaceSubscription with always_invoice proration (immediately bills any outstanding metered usage), and syncs the local subscription record via SubscriptionService.syncFromStripe. Authorization:
  • Required role: owner only

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json

At least one of planLevel or billingCycle is required; unset fields default to STARTER/monthly.

planLevel
enum<string>
Available options:
FREE,
STARTER,
PLUS,
PREMIUM
billingCycle
enum<string>
Available options:
monthly,
quarterly,
annually

Response

Plan changed successfully

status
string
Example:

"success"

message
string
data
object