Create a subscription
Subscribes a customer to a plan. If the plan has a trial period, the subscription starts in trialing state and the first charge fires at trial_end_at. Use preferred_rail: transfer for customers who pay by bank transfer.
Authorizations
Use sk_test_ keys for sandbox. Use sk_live_ keys for production. Obtain your key from the dashboard.
Body
"cus_01JABC..."
"pln_01JABC..."
Card token from Nomba. Required for card-rail subscriptions.
"tok_test_visa"
card, transfer, direct_debit "card"
1
Response
Subscription created
subscription "sub_01JABC..."
incomplete, active, trialing, past_due, grace, delinquent, paused, canceled "active"
True when the subscription is set to cancel at period end (still active until then).
false
Whether a card token is on file. Transfer-funded subs have none.
true
A pending period-end plan change (e.g. a scheduled downgrade).