Create subscription
Create a subscription for a customer. Requires either planId/planCode and customerId/externalId.
Create a subscription for a customer. Requires either planId/planCode and customerId/externalId.
ApiKeyAuth In: header
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= length1 <= length <= 200"monthly" | "quarterly" | "yearly" | nullfalsedate-timeuriapplication/json
curl -X POST "https://commet.co/api/subscriptions" \ -H "Content-Type: application/json" \ -d '{ "customerId": "string" }'application/json
application/json
application/json
application/json
Create a subscription for a customer. Requires either planId/planCode and customerId/externalId.
{
"success": true,
"data": {
"id": "string",
"customerId": "string",
"planId": "string",
"planName": "string",
"name": "string",
"status": "string",
"billingInterval": "string",
"trialEndsAt"
{
"success": true,
"data": {
"id": "string",
"customerId": "string",
"planId": "string",
"planName": "string",
"name": "string",
"status": "string",
"billingInterval": "string",
"trialEndsAt"
{
"success": false,
"code": "string",
"message": "string",
"details": null
}{
"success": false,
"code": "string",
"message": "string",
"details": null
}{
"success": false,
"code": "string",
"message": "string",
"details": null
}