Skip to main content
POST
Create a subscription

Authorizations

X-API-Key
string
header
required

Company API key. Send in the X-API-Key header.

Headers

x-client-id
string
required

Client identifier for the company in the request.

Example:

"client_abc123"

Body

application/json
plan_uuid
string<uuid>
required

UUID of the subscription plan to attach.

Example:

"plan-uuid-..."

customer_token
string
required

Token of an existing customer.

Example:

"cus_token_abc123"

card_token
string | null

Stored card token to charge on each cycle. Required for paid plans without a trial.

Example:

"card_tok_xyz"

coupon_code
string | null

Discount coupon code to apply at creation (max 50 chars).

Example:

"PROMO10"

billing_day
integer | null

Override the plan billing day (1–28). Defaults to plan or creation day.

Example:

10

gateway_id
integer | null

Force a specific gateway ID for this subscription's charges.

Example:

1

metadata
object | null

Arbitrary key-value data stored with the subscription.

Response

Subscription created

data
object