Usage entitlements
Put a metric and price on an agreement, or hold prepaid credit, and read the balance.
Endpoints
Guides that use it
Sell prepaid credit
Let customers buy prepaid usage credit with an invoice, add it once payment completes, and follow the balance, credit history, refunds and spending limits.
Balance alerts
Get a webhook when a customer's prepaid credit runs low or runs out, so you can ask them to top up before usage is charged or blocked.
Credit units and purchases
Configure a credit unit, publish currency rates, price metered usage, and follow quoted purchases through payment, posted balances, refunds, and receipts.
Credits and burndown
Sell prepaid credit, add it safely with an idempotency key, read the balance, and see exactly what is used first when usage is billed.
Usage entitlements
What each customer gets on an agreement. Metered usage on a pinned price version, an included allowance, an overage policy, and prepaid credit balances.
How usage is billed
Billing periods, late usage, usage on the renewal invoice, the separate usage invoice, prepaid credit, billing runs, held bills and test mode.
Quickstart
Set up usage billing for one customer in test mode and send their first usage events, then read usage so far, in short Node.js scripts.
Set up usage billing
Create a metric, a price, an agreement for a customer's subscription, entitlements and a usage key, with the API or in the dashboard.
Usage billing API
Every usage billing route on the Comecero API, grouped by resource, with who may call it and a link to its full page in the API reference.
Find a customer's subscription GET
Finds the one active billing agreement that covers your customer id at a time, and the subscription it bills. Use it to check which subscription usage sent now (or at `occurred_at`) will be billed to. Secret and trusted tokens may call it; a limited token may not (`403`).
Change usage terms POST
Revision checked credit operation. Secret and trusted tokens require the applicable resource permission. New writes require header idempotency. Immutable rates do not reprice existing agreements. Core validates exact conversion, current funding, prepared work and protected billing boundaries.