Skip to main content
POST
Subscribe to a Plan
Starts a payment for the plan and billing cycle. Send the user to checkout_url to complete payment. The plan changes only after the payment succeeds. Yearly plans cost 10 times the monthly price and reset their credits every month. See Annual billing for the switching rules.
Only the workspace owner can call this endpoint. It is protected by the billing:manage permission.

Request

Headers

string
required
Bearer token (JWT or API key)

Body

string
required
Target plan: starter, creator or pro
string
default:"monthly"
monthly or yearly

Response

string
Dodo checkout page to redirect the user to
string
subscribe, upgrade or switch_to_yearly
string
monthly or yearly
number
Price in USD for the chosen cycle
object
Present on a yearly-to-higher-yearly upgrade. credit_usd is the discount, months_left the unused full months, and discount_id the one-time discount applied at checkout.

Errors