Retrieve the organization's billing
The organization's plan (and contract), the current billing month's usage and what it would add to the next invoice so far, its standing (past_due, billing holds), payment method, and what the plan includes. Organization-wide: every environment's key sees the same. Plan changes are made in the dashboard; subscribe to the billing.* webhook events to follow them.
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"The organization's billing.
application/json- response
- response
- …
object*"billing""billing"organization_id*stringThe organization's id.
plan*stringThe plan in effect now (free without a contract).
"free""pro""scale""enterprise"contract*|The contract in effect; null on the Free plan.
scheduled_change*|A plan change that takes effect later (a downgrade, a cancellation).
status*stringpast_due: an invoice is overdue; delinquent: past its grace period, and live sending is held.
"active""past_due""delinquent"holds*array<>Billing holds on live sending (sandbox keys keep working).
currency*"usd"Always usd.
"usd"period*The current billing month (UTC).
usage*array<>This month's usage per meter.
estimate*This month so far, as it would be invoiced if it ended now.
credit_remaining*integerUnused credit usable this month.
spend_limit*|Usage beyond the credit past which live sending is held; null: none.
credit_limit*|Where the organization stands against its credit limit; null: it has none.
payment_method*|The payment method on file. null: none.
add_ons*array<>Add-ons of the contract in effect, charged on top of the plan.
features*Which features the plan includes.
limits*Resource limits (null: unlimited).
import { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.billing.get();{ "object": "billing", "organization_id": "org_01k7c8m4q2f3e9v6t5r1n0p8yz", "plan": "pro", "contract": { "id": "bcon_01k7c8m4q2f3e9v6t5r1n0p8yz", "kind": "self_serve", "effective_from": "2026-10-01T00:00:00.000Z", "effective_until": null, "term_end": null, "auto_renew": false }, "scheduled_change": null, "status": "active", "holds": [], "currency": "usd", "period": { "start": "2026-10-01T00:00:00.000Z", "end": "2026-11-01T00:00:00.000Z" }, "usage": [ { "meter": "email.recipients", "quantity": 120000, "included": null } ], "estimate": { "usage": 4800, "discount": 0, "credit": 2500, "total": 2300 }, "credit_remaining": 0, "spend_limit": null, "credit_limit": { "limit": 50000, "used": 2300, "charge_threshold": 10000 }, "payment_method": { "type": "card", "brand": "visa", "last4": "4242" }, "add_ons": [], "features": { "tracking_domains": true, "audit_log": true, "log_drains": false, "sso": false, "scim": false, "dedicated_ips": false }, "limits": { "domains": 10, "members": 10, "webhook_endpoints_per_environment": 10, "contacts_per_environment": 50000, "inboxes": 1000 }}