Skip to main content
POST
Create a subscription

Authorizations

Authorization
string
header
required

Paste your secret key as the bearer token: sk_test_… (test) or sk_live_… (live). That is all a normal API call needs. OAuth access tokens from POST /v1/oauth/token also work, but a client id/secret is only for platforms acting on another tenant's behalf, not for your own integration.

Body

application/json
customerId
string
required
planId
string
required
paymentMethodId
string
metadata
object

Response

201 - application/json

Created

id
string
status
enum<string>
Available options:
incomplete,
trialing,
active,
past_due,
paused,
unpaid,
canceled,
expired
planId
string
currentPeriodStart
string | null
currentPeriodEnd
string | null
cyclesCompleted
integer
createdAt
string