Subscriptions
Create a new subscription
Subscribe a customer to a plan. The plan must have a price matching the specified currency. Optionally set a trial period in days.
post/api/subscriptions
Request body
Example request
{
"currency": "NGN",
"trialDays": 14
}Response
Subscription created (status: ACTIVE or TRIALING)
Example response
{
"id": "clx1234567890",
"externalId": "ext_sub_123",
"customerId": "clxcust123",
"planId": "clxplan123",
"status": "ACTIVE",
"currency": "USD",
"billingTiming": "IN_ARREARS",
"customer": {
"id": "clx1234567890",
"name": "Jane Doe",
"email": "jane@example.com"
},
"plan": {
"id": "clxplan123",
"name": "Premium Monthly",
"billingInterval": "MONTHLY"
}
}