---
title: "Get billing state"
method: GET
path: "/billing/state"
tags: ["Billing"]
---

# Get billing state

`GET /billing/state`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/billing/state`
- Auth: HTTP bearer

Returns the organization’s provider-neutral billing state: subscription status, plan-differentiated capability flags, the AI credit meter, the prepaid credit balance purchased through top-ups, credits granted by Cactal support with their remaining balance and expiry, and capacity for websites with custom domains. Requires the organization owner.

## Query parameters

- `organizationId` string, required

## Response `200`

Current billing state for the organization.

- object
  - `organizationId` string, required: Organization this billing state belongs to.
  - `status` 'no_subscription' | 'active' | 'billing_grace', required: Provider-neutral subscription status. `billing_grace` means past due: existing websites keep serving, but paid changes and metered consumption are blocked. The auto-enabled free plan reports `no_subscription`.
  - `complimentary` boolean, required: True when the organization has the manually assigned, no-charge complimentary plan.
  - `subscription` object: Current paid subscription metadata. Omitted on the free plan or when the provider does not report one.
    - `plan` 'pro' | 'enterprise', required: Current plan. `enterprise` is a per-customer custom plan managed by sales.
    - `interval` 'monthly' | 'annual': Billing interval. Omitted for enterprise custom plans when the provider does not report a public interval.
    - `aiCreditTier` number: Monthly AI credit allowance granted by the subscription. Omitted when the provider does not report it.
    - `currentPeriodEnd` number: Current billing period end as Unix time in milliseconds. Omitted when the provider does not report it.
    - `canceledAtPeriodEnd` boolean, required: True when cancellation is scheduled for the end of the current billing period.
  - `capabilities` object, required: Plan-differentiated product capabilities currently available to the organization.
  - `meters` object, required: Customer-facing usage meters keyed by meter ID.
  - `usageBalance` object: Prepaid credit balance purchased through top-ups. These credits never expire and are consumed after the monthly allowance. Omitted when the provider does not report it.
    - `included` number, required: Amount included with the current plan.
    - `prepaid` number, required: Amount purchased as prepaid balance.
    - `used` number, required: Amount consumed in the current period.
    - `remainingIncluded` number, required: Unused portion of the included amount.
    - `remainingPrepaid` number, required: Unused portion of the prepaid amount.
    - `remaining` number, required: Total currently spendable amount after temporary reservations.
    - `settledRemaining` number, required: Total remaining amount after settled consumption, excluding temporary reservations.
    - `nextResetAt` number: Next balance reset as Unix time in milliseconds. Omitted for balances that do not reset.
    - `unlimited` boolean, required: True when the meter is not limited on the current plan.
  - `creditGrants` object[], required: Credits granted to the organization by Cactal support. Spent after the monthly allowance and before purchased credits; grants with an expiry are spent soonest first.
    - `id` string, required: Credit grant identifier.
    - `credits` number, required: Credits originally granted.
    - `remaining` number, required: Unspent credits on this grant.
    - `expiresAt` number: Expiry as Unix time in milliseconds. Omitted when the grant never expires.
  - `billableSiteCapacity` number: Total capacity for websites with custom domains. Omitted when the provider does not report it.
  - `billableSiteCount` number: Number of websites with at least one custom domain.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
