Skip to main content
POST
Switch subscription plan

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request schema for switching subscription plan.

cancel_path
string
required

Partial path (e.g. /billing/plans) of where the stripe Checkout session should redirect the user if payment is cancelled.

Required string length: 1 - 255
new_product
enum<string>
required

The new product to switch to.

Available options:
free_plan,
team_plan,
pro_plan,
enterprise_plan
success_path
string
required

Partial path (e.g. /billing/complete) of where the stripe Checkout session should redirect the user if payment is successful.

Required string length: 1 - 255
billing_interval
enum<string>
default:month

The billing interval to subscribe with.

Available options:
month,
year
credit_tier_key
string | null

The credit tier to subscribe to (e.g. 'tier_20k'). Required for products with selectable credit tiers (the Team plan).

Required string length: 1 - 50

Response

Successful Response

Where to send the customer to complete the plan change.

There is no "completed" case: Stripe confirms every plan change, so this always carries a URL to leave for.

redirect_url
string<uri>
required

The URL to redirect the customer to.

Required string length: 1 - 2083
type
enum<string>
required

Which Stripe surface completes the change: 'checkout' for a first paid subscription, 'portal' for a change to an existing one.

Available options:
checkout,
portal