v1
latestOpenAPI 3.1.02026-07-24170121.2 MBCreate a Subscription
This API creates a subscription.
post/v1/subscriptions
Headers
Acceptstring required
Indicates which content types, expressed as MIME types, the client is able to understand.
Content-Typestring required
Indicates the media type of the resource sent in the HTTP message body. <br /><br /><b>Possible Values:</b><br /> application/json<br />application/x-www-form-urlencoded
Request body
Response
201
Example response
{
"data": {
"object": "Subscription",
"id": "Vg0rxj00XXljPAoX",
"customer_id": "jDPAnVxA4xPDVpKM",
"billing_type": 1,
"current_period_end": 1726490792,
"current_period_start": 1726145192,
"plan_ref": "n2pv6j6p2pvj3Ygq",
"start_at": 1726490792,
"status": "trial",
"trial_end": 1726490792,
"trial_days": 4,
"trial_start": 1726145192,
"created_at": 1726145192,
"updated_at": 1726145192,
"payment_type": "card",
"pause_units_allowed": [
"days"
],
"plan": {
"data": {
"object": "Plan",
"plan_id": "plan_d2b50d00",
"amount": 99,
"interval": "day",
"interval_count": 1,
"name": "test",
"statement_descriptor": "dfghdfhg",
"currency": "usd",
"created_at": 1724503321,
"updated_at": 1724505447
}
}
},
"meta": {
"include": [
"plan"
]
}
}