Commet
  • Pricing
Log InTry out
Cancel subscription POSTChange plan POSTCreate subscription POSTGet active subscription GETList subscriptions GET
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Get active subscription

Get the active subscription for a customer. Returns null if none.

Create subscription POST

Create a subscription for a customer. Requires either planId/planCode and customerId/externalId.

List subscriptions GET

List all subscriptions. Filter by customer ID, external ID, or status.

GET
/subscriptions/active

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Query Parameters

customerId?string
externalId?string

Response Body

application/json

application/json

application/json

curl -X GET "https://commet.co/api/subscriptions/active"

Get the active subscription for a customer. Returns null if none.

{
  "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
}
:
"string"
,
"startDate": "2019-08-24T14:15:22Z",
"endDate": "string",
"currentPeriodStart": "string",
"currentPeriodEnd": "string",
"billingDayOfMonth": 0,
"checkoutUrl": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"discountType": "string",
"discountValue": 0,
"discountEndsAt": "string",
"discountName": "string"
}
}