Skip to main content
Pro: 500 messages a month, then 1 cent a message. Scale: 5,000 credits a month, then $0.01 a credit, up to $20 a month.
Overage turns a customer’s busiest month into revenue instead of a dead end. They keep working past their allowance: Ledger records the extra units, and Stripe bills them on the next renewal invoice (each month’s own invoice on an annual plan), up to a monthly cap. Overage can be priced on a plan’s credits, on a metered item, or both, at one rate or in bands. A $0 plan with overage and nothing included is pay as you go.

The catalog

Credit overage goes on the plan: overageUnitAmountCents, the price per overageBillingUnits credits (default 1), and optionally overageCapCents, a default monthly cap. Metered overage goes on the item: overageUnitAmountCents per overageBillingUnits units past included.
Your integration stays the same: the same check and track calls bill as overage once the allowance is spent.

What check and track return

Credits

Ledger spends grants in spend order, then overage. A use that costs more than what’s left spends the rest and records the remainder as overage. A Scale customer with 1,000 credits left who tracks a 2,500-credit use gets:
Response
overageCredits is this period’s credit overage so far, and overageRemainingCents is what’s left under the cap ($20.00 − $15.00). availableCredits never goes below 0.

Metered

A Pro customer with 50 messages left who tracks quantity: 170 spends the 50 and records 120 as overage:
Response
balance.used counts the overage, remaining stays at 0, and overageAllowed: true says a use past remaining will be billed. overageCredits counts credits only, so it stays at 0. overageRemainingCents is null here because this customer has no cap. check makes the same decision as track, so allowed: true can mean the use will be billed as overage.

Which cap applies

A customer’s own cap replaces the plan’s, higher or lower, and 0 turns overage off for that customer. Set it, or a negotiated rate, in Overrides.

Prices below a cent

overageUnitAmountCents is whole cents, so price a sub-cent unit per batch with overageBillingUnits.
Docs API: $49 a month for 1,000 pages, then $7.50 per 1,000 pages.
pages is a metered feature:
Rounding happens once per period, not per event. Ledger adds up the period’s overage units for each rate, divides by overageBillingUnits and rounds up: ceil(units ÷ overageBillingUnits) × overageUnitAmountCents. A month with 2,400 pages of overage bills ceil(2.4) × 750 = $22.50, however many tracks made up those pages. The cap uses the same sum, so the first page of overage already counts as $7.50 against it.

Overage controls

Shape how overage runs for each balance, on a plan for everyone on it or for one customer or entity: turn it off, give a free buffer before billing starts, or record it without invoicing it. Each entry targets the shared credit pool (creditPool: true) or a metered feature.
ledger.catalog.json
Give one customer or entity their own entries with POST /v1/customers/controls, and read what applies, with each entry’s billed, unbilled and freeLeft this period, from GET /v1/customers/controls. Overage entries sit beside usage limits and usage alerts in a plan’s controls.

How it’s billed

Customers see the terms before they pay. Above Checkout’s Subscribe button, Ledger adds what the plan includes and how overage bills, with the customer’s own cap or rate when they have one: “Includes 1,000 credits each month. Unused credits don’t roll over. After that, extra credits are billed on your next invoice at $0.50 per 10 credits, rounded up to the next 10, up to $20.00 a month.” Each renewal invoice gets one line per rate for the period that just ended, such as “Scale – overage, 1,500 credits”, and one per metered feature and rate, such as “Pro – Messages overage, 120”, under the item’s own Stripe product. Tiered overage bills one line per band reached, such as “Scale – overage, 4,500 credits (units 1–4,000)” and “(units 4,001 and up)”, and a band’s flat fee on its own line. After a plan change, the old plan’s overage bills at its own rate. On an annual plan, each month’s overage goes on an invoice of its own when the month ends, and the year’s last month on the renewal invoice. When a subscription ends, Ledger bills any remaining overage, credit and metered, on a final invoice. Invoices and Stripe shows the whole invoice. The customer API’s overage object counts both kinds: costCents and remainingCents cover credit and metered overage, credits counts credits only. In the dashboard, a customer in overage shows In overage and a meter against their cap.

Usage at cost on a dollar balance

On a dollar balance, “usage at cost” is one cent per cent of usage: overageUnitAmountCents: 1, overageBillingUnits: 1000 at 100,000 credits per dollar. Keep the unit at a cent: at 100 per 100000, $2.35 of usage would count as $3.00. It works on the plan (the shared pool) or on an own-balance AI item, and the invoice line shows dollars: “Pro – overage, $12.35”. A model call past the cap is charged as far as it fits, and the rest is reported as uncoveredCredits.

The rules

  • All or nothing. A use past the allowance is recorded in full, part from the allowance and the rest as overage, or refused whole.
  • One cap per customer. Credit and metered overage add up against one cap, in cents, for the customer’s billing period, or for the month on an annual plan. The use that would pass it is refused whole with 409 overage_cap_reached, whichever kind it is; one that lands exactly on it is allowed. check answers allowed: false with reason: "overage_cap_reached". Which cap applies says where it comes from.
  • What a period costs. ceil(units ÷ overageBillingUnits) × overageUnitAmountCents for each rate, rounded once per period: 15 messages at 50 cents per 10 bill $1.00. See Prices below a cent.
  • Overage runs while the plan is active, and while a renewal is past_due on a plan or customer that ignores past due. During a trial, or while any other renewal is past due, a metered use past its allowance is refused with limit_reached, and a credit use with insufficient_credits.
  • Overage prices go on the plan (credits) or on metered items. Held, boolean, credits and unlimited items take none. overageBillingUnits needs overageUnitAmountCents.
  • Tiers price the period’s total. With overage tiers, the period’s overage units are priced in bands, graduated or volume, instead of at one rate. The cap counts the period’s cost at those band prices, so a use is refused at the rate it would really be billed at. A customer’s negotiated rate replaces the tiers with its one rate.
  • Annual plans that reset monthly bill each month’s overage on its own invoice when the month ends. An annual plan with overage resets monthly (resetInterval: "year" returns annual_overage_not_supported), and a lifetime plan bills only up front (one_off_plan_cannot_bill_later).
  • A change is a new version. Adding or changing overage publishes a new plan version: customers already on the plan keep their current terms.
  • Overage entries are money terms. Changing a plan’s controls.overage publishes a new plan version too. An entry targets the pool or a metered feature, once each, and allowed: true without an overage price needs freeUnits. Publishing checks these, and POST /v1/customers/controls answers 400 invalid_overage_control.