Skip to main content
POST
Create Subscription

Authorizations

Authorization
string
header
required

API key (sk_test_* or sk_live_*)

Body

application/json
customer
string
required
items
object[]
required
trial_period_days
integer
trial_end
integer
billing_cycle_anchor
integer
cancel_at_period_end
boolean
collection_method
enum<string>
Available options:
charge_automatically,
send_invoice
days_until_due
integer
default_payment_method
string
metadata
object

Response

Subscription created

id
string
object
enum<string>
Available options:
subscription
customer
string
status
enum<string>
Available options:
trialing,
active,
past_due,
paused,
canceled,
unpaid
current_period_start
integer
current_period_end
integer
trial_start
integer
trial_end
integer
cancel_at_period_end
boolean
canceled_at
integer
ended_at
integer
collection_method
string
days_until_due
integer
default_payment_method
string
items
object
latest_invoice
string
metadata
object
created
integer