curl --request POST \
--url 'https://api.stateset.com/api/v1/subscriptions' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"coupon_code": null,
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method_id": null,
"plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"skip_trial": null
}'
{
"billing_interval": "string",
"created_at": "string",
"currency": "string",
"customer_id": "string",
"id": "string",
"price": "string",
"status": "string",
"updated_at": "string"
}
Create a subscription
Create a subscription
POST
/
api
/
v1
/
subscriptions
curl --request POST \
--url 'https://api.stateset.com/api/v1/subscriptions' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"coupon_code": null,
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method_id": null,
"plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"skip_trial": null
}'
{
"billing_interval": "string",
"created_at": "string",
"currency": "string",
"customer_id": "string",
"id": "string",
"price": "string",
"status": "string",
"updated_at": "string"
}
Request body
CreateSubscriptionRequest
string,null
string (uuid)
required
string,null
string (uuid)
required
boolean,null
Responses
SubscriptionResponse
ErrorBody
curl --request POST \
--url 'https://api.stateset.com/api/v1/subscriptions' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"coupon_code": null,
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payment_method_id": null,
"plan_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"skip_trial": null
}'
{
"billing_interval": "string",
"created_at": "string",
"currency": "string",
"customer_id": "string",
"id": "string",
"price": "string",
"status": "string",
"updated_at": "string"
}
โI