Every usage billing system has the same stages. Lago describes them in sequence: the product emits an event for every billable action, a meter deduplicates and aggregates events per customer, rating applies the price plan, and the system generates an invoice, collects payment and retries failures.
Product action
-> usage event (id, customer, type, quantity, timestamp)
-> meter: validate, deduplicate, aggregate per customer and period
-> rating: apply plan, allowances, tiers, negotiated rates
-> invoice: line items traceable to metric and events
-> payment, dunning, revenue recognition
The event. Ordway notes that each event typically includes a customer identifier, timestamp, event type and relevant properties such as quantity, and that the schema you define determines what you can bill for later. A minimal event looks like this:
{
"id": "req_8f3a2c71",
"customer_id": "cus_1042",
"type": "api_call",
"quantity": 1,
"properties": { "region": "eu", "endpoint": "/v1/search" },
"timestamp": "2026-10-17T09:14:03Z"
}
The meter. Aggregation turns events into a billable number. Lago lists the common functions: count, sum, max, unique count, last value and weighted sum. Check which ones your billing platform supports before you publish a price. UsageBox points out that some meters support only a few aggregations, so a metric like peak concurrent users must be computed upstream and reported as a resolved number.
Rating. This applies the price plan to the aggregated quantity. Lago recommends that you keep price versions dated so last month's invoice can be reproduced after a change. Without dated prices, a pricing change silently rewrites history.
The invoice. Each line should trace back to its metric and its events. Ordway calls this a full audit trail from raw event to invoice line item, and it is what lets you resolve a dispute in minutes instead of days.