Create a subscription
Creates a new subscription linking a customer to a plan. The subscription is activated immediately.
The `billing_cycle` can be a UUID (billing cycle ID) or a name like `"monthly"` or `"yearly"` — it will be matched against the plan's available billing cycles.
If `country_id` is not provided, it is resolved from the customer's record.
Authentication
AuthorizationBearer
Use a secret key (sk_test_* or sk_live_*) for full read/write access, or a public key (pk_test_* or pk_live_*) for read-only access.
Request
This endpoint expects an object.
customer_id
The customer to subscribe.
plan_id
The plan to subscribe to.
billing_cycle
Billing cycle UUID or name (e.g., "monthly", "yearly"). Defaults to the plan’s first billing cycle.
start_date
Subscription start date. Defaults to today.
billing_date
First billing date. Defaults to start date.
country_id
Country for tax and currency. Resolved from customer if not provided.
pricing_scheme_id
Override the plan's default pricing scheme.
payment_term_id
quantity
Seat count or quantity (for per-unit pricing).
metadata
Response
Subscription created successfully
data
Errors
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error