ChargeDesk · Schema
Subscription
A recurring subscription record in ChargeDesk
PaymentsBillingSubscriptionsChargesRefundsCustomer ManagementPayment GatewayHelpdesk IntegrationREST API
Properties
| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier assigned by ChargeDesk |
| object | string | |
| subscription_id | string | Subscription identifier (from your system or gateway) |
| customer_id | string | Associated customer identifier |
| status | string | Current subscription status |
| amount | number | Recurring billing amount |
| currency | string | 3-letter ISO currency code |
| interval | string | Billing interval |
| interval_count | integer | Number of intervals between billings |
| quantity | integer | Quantity of the subscribed product |
| trial_start | string | When the trial period started |
| trial_end | string | When the trial period ends |
| billing_cycles_total | integer | Total number of billing cycles |
| billing_cycles_current | integer | Current billing cycle count |
| items | array | Subscription line items |
| metadata | object | Arbitrary key-value metadata |
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://api.chargedesk.com/v1/schema/subscription",
"title": "Subscription",
"description": "A recurring subscription record in ChargeDesk",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier assigned by ChargeDesk"
},
"object": {
"type": "string",
"const": "subscription"
},
"subscription_id": {
"type": "string",
"description": "Subscription identifier (from your system or gateway)"
},
"customer_id": {
"type": "string",
"description": "Associated customer identifier"
},
"status": {
"type": "string",
"description": "Current subscription status",
"enum": [
"requested",
"pending",
"new",
"trialing",
"active",
"past_due",
"canceled",
"unpaid",
"suspended",
"pending_cancel"
]
},
"amount": {
"type": "number",
"description": "Recurring billing amount"
},
"currency": {
"type": "string",
"description": "3-letter ISO currency code",
"minLength": 3,
"maxLength": 3
},
"interval": {
"type": "string",
"description": "Billing interval",
"enum": ["day", "week", "month", "year"]
},
"interval_count": {
"type": "integer",
"description": "Number of intervals between billings",
"minimum": 1
},
"quantity": {
"type": "integer",
"description": "Quantity of the subscribed product",
"minimum": 1
},
"trial_start": {
"type": "string",
"format": "date-time",
"description": "When the trial period started"
},
"trial_end": {
"type": "string",
"format": "date-time",
"description": "When the trial period ends"
},
"billing_cycles_total": {
"type": "integer",
"description": "Total number of billing cycles",
"minimum": 0
},
"billing_cycles_current": {
"type": "integer",
"description": "Current billing cycle count",
"minimum": 0
},
"items": {
"type": "array",
"description": "Subscription line items",
"items": {
"type": "object"
}
},
"metadata": {
"type": "object",
"description": "Arbitrary key-value metadata",
"additionalProperties": { "type": "string" }
}
},
"required": ["subscription_id"]
}