COSS
Billing

Retrieve the organization's billing

GET
/v1/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.

Authorization

bearerAuth
headerAuthorizationBearer <token>

A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.

Header Parameters

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.

Value in"2026-10-10"

Response Body

The organization's billing.

application/json
  1. response
object*"billing"
Value in"billing"
organization_id*string
plan*string

The plan in effect now (free without a contract).

Value in"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*string

past_due: an invoice is overdue; delinquent: past its grace period, and live sending is held.

Value in"active""past_due""delinquent"
holds*array<>

Billing holds on live sending (sandbox keys keep working).

currency*"usd"
Value in"usd"
period*

The current billing month (UTC).

usage*array<>
estimate*

This month so far, as it would be invoiced if it ended now.

credit_remaining*integer

Unused credit usable this month.

spend_limit*|

Usage beyond the credit past which live sending is held; null: none.

payment_method*|null
features*
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,  "payment_method": {    "type": "card",    "brand": "visa",    "last4": "4242"  },  "features": {    "tracking_domains": true,    "audit_log": true,    "log_drains": false,    "sso": false,    "scim": false  },  "limits": {    "domains": 10,    "members": 10,    "webhook_endpoints_per_environment": 10  }}