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.
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"
}
}Changes
Changed in 1 of the 2 revisions of this API.7
- ○
added the new optional request property
canceledAtnew-optional-request-property
- ○
added the new optional request property
createdAtnew-optional-request-property
- ○
added the new optional request property
currentPeriodEndnew-optional-request-property
- ○
added the new optional request property
externalIdnew-optional-request-property
- ○
added the new optional request property
startDatenew-optional-request-property
- ○
added the new optional request property
statusnew-optional-request-property
- ○
added the media type
application/jsonfor the response with the status201response-media-type-added
- ○