Commet
  • Precios
Iniciar SesiónRegistrarse
Adjust balance POSTCancel subscription POSTChange plan POSTCreate subscription POSTGet active subscription GETGet subscription by ID GETList subscriptions GETPreview plan change POSTTop up balance POSTRevert scheduled cancellation POST
DocumentaciónRecursosConstruir con AIAPI ReferenceWebhooks

Get subscription by ID

Get a subscription by its public ID, regardless of status (including pending_payment and past_due).

Get active subscription GET

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

List subscriptions GET

List all subscriptions. Filter by customer ID or status.

Get a subscription by its public ID, regardless of status (including pending_payment and past_due).

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Path Parameters

Response Body

application/json

application/json

{
  "success": true,
  "data": {
    "object": "subscription",
    "livemode": true,
    "id": "string",
    "customerId": "string",
    "planId": "string",
    "planName": "string",
    "name": "string",
    "status"















{
  "success": false,
  "error": {
    "type": "validation_error",
    "code": "string",
    "message": "string",
    "doc_url": "string",
    "param": "string"
  }
}
GET
/subscriptions/{id}
:
"draft"
,
"billingInterval": "weekly",
"trialEndsAt": "string",
"startDate": "2019-08-24T14:15:22Z",
"endDate": "string",
"currentPeriodStart": "string",
"currentPeriodEnd": "string",
"billingDayOfMonth": 0,
id*string

Subscription public ID

curl -X GET "https://commet.co/api/v1/subscriptions/string"
"checkoutUrl": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"discountType": "percentage",
"discountValue": 0,
"discountEndsAt": "string",
"discountName": "string"
}
}