CustomDomain™ docs
API referenceBilling

The workspace's subscription (owners and admins)

GET
/billing/status

The billing page: plan, state, trial or grace countdown, the next charge, the card on file, what a checkout started now would give, and this month's usage. Requires billing:manage (owners and admins); members and viewers get 403.

AuthorizationBearer <token>

Long-lived tenant API key, cd_live_… (production) or cd_test_… (staging, development), stored hashed. Keys created before the switch to cd_ start with sk_live_… / sk_test_… and are still accepted. Scoped to the owning application's tenant.

In: header

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/billing/status"
{  "tenant_id": "string",  "state": "trialing",  "reason": "string",  "restricted": true,  "first_domain_free": true,  "attention": true,  "setup_required": true,  "days_left": 0,  "price_cents": 0,  "currency": "string",  "trial_ends_at": "2019-08-24T14:15:22Z",  "grace_started_at": "2019-08-24T14:15:22Z",  "grace_ends_at": "2019-08-24T14:15:22Z",  "current_period_end": "2019-08-24T14:15:22Z",  "cancel_at_period_end": true,  "ended_at": "2019-08-24T14:15:22Z",  "comped": true,  "comped_until": "2019-08-24T14:15:22Z",  "payment_failed": true,  "payment_failed_at": "2019-08-24T14:15:22Z",  "has_billing_account": true,  "portal_available": true,  "can_change_plan": true,  "mode": "test",  "plan": {    "id": "starter",    "name": "string",    "price_cents": 0,    "public_price": true,    "domains_per_year": 0,    "domains_per_month": 0,    "hard_cap": true,    "retired": true  },  "next_charge": {    "at": "2019-08-24T14:15:22Z",    "amount_cents": 0,    "currency": "string"  },  "checkout": {    "available": true,    "trial_days": 0,    "trial_end": "2019-08-24T14:15:22Z",    "first_charge_at": "2019-08-24T14:15:22Z",    "default_plan": "starter"  },  "usage": {    "used": 0,    "quota": 0,    "period_start": "2019-08-24T14:15:22Z",    "period_end": "2019-08-24T14:15:22Z"  },  "payment_method": {    "type": "card",    "brand": "string",    "last4": "string",    "exp_month": 0,    "exp_year": 0,    "wallet": "apple_pay",    "email": "string"  }}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}