Skip to main content

BillingSubscription

idstring
providerstring
Example: stripe
statusstring
Example: active
originstring

Possible values: [checkout, admin, stripe_import, legacy, license]

quantityModestring

Possible values: [licensed, metered]

plan objectnullable
slugstring
namestring
familystringnullable
intervalstring
intervalCountinteger
billingModelstring
numbersintegernullable

Numbers covered by a subscription bought in slots (quantityMode: licensed). null on usage-measured ones (metered).

amountCentsintegernullable
currencystringnullable
trialEndsAtstring<date-time>nullable
currentPeriodEndstring<date-time>nullable
cancelAtPeriodEndboolean
pausedUntilstring<date-time>nullable
pendingUpdateboolean
pendingChange objectnullable

A scheduled change — a downgrade takes effect at the end of the paid period.

kindstring

Possible values: [upgrade, downgrade]

planSlugstring
planNamestring
numbersinteger
effectiveAtstring<date-time>
card objectnullable
brandstringnullable
last4stringnullable
actions object

What the dashboard allows doing with this subscription right now. The actions need the account owner’s session — an API key gets 403 owner_required.

changeboolean
cancelboolean
resumeboolean
endTrialboolean
cancelPendingChangeboolean
pauseboolean
unpauseboolean
BillingSubscription
{
"id": "string",
"provider": "stripe",
"status": "active",
"origin": "checkout",
"quantityMode": "licensed",
"plan": {
"slug": "string",
"name": "string",
"family": "string",
"interval": "string",
"intervalCount": 0,
"billingModel": "string"
},
"numbers": 0,
"amountCents": 0,
"currency": "string",
"trialEndsAt": "2024-07-29T15:51:28.071Z",
"currentPeriodEnd": "2024-07-29T15:51:28.071Z",
"cancelAtPeriodEnd": true,
"pausedUntil": "2024-07-29T15:51:28.071Z",
"pendingUpdate": true,
"pendingChange": {
"kind": "upgrade",
"planSlug": "string",
"planName": "string",
"numbers": 0,
"effectiveAt": "2024-07-29T15:51:28.071Z"
},
"card": {
"brand": "string",
"last4": "string"
},
"actions": {
"change": true,
"cancel": true,
"resume": true,
"endTrial": true,
"cancelPendingChange": true,
"pause": true,
"unpause": true
}
}