What is metered billing? From usage events to invoice lines
Metered billing explained: how usage events become invoice lines, how to handle duplicates, late usage and disputes, and a month worked with real numbers.
Supreet Gupta, Co-founder
· 9 min read

On this page
- How does metered billing work?
- What does a meter count?
- What are the common metered billing complications?
- Duplicate events and idempotency
- Late-arriving usage and period close
- Time zones and period boundaries
- Disputes over metered usage
- Worked example: one month of usage
- How should usage show on the invoice?
- When doesn't metered billing fit?
- A checklist for each new meter
Metered billing is charging a customer for measured usage, such as API calls, minutes or gigabytes, counted by a meter over a billing period and priced at the contract's rates. Each period, the usage events are deduplicated, totalled per customer and meter, rated against the rate card or tiers, and placed on the invoice as lines.
Metered pricing is the price itself, per unit or in bands, and choosing it is covered in the usage-based pricing guide. Metered billing is the work of applying that price to real usage every period, and that work is where usage invoices usually go wrong.
How does metered billing work?
Metered billing moves usage through five steps, from a raw event to a line on the invoice. Each step can drop or double usage, so each one needs a rule that finance can check.
- Event. A record that something billable happened, with the customer, a timestamp, the meter, a quantity and a unique id. One API call is an event, and so is one finished phone call.
- Meter. The named thing being counted, with its aggregation rule: add up the minutes, count the calls, or take the highest seat count.
- Aggregation. The events are totalled per customer, per meter and per billing period, by the time the usage happened.
- Rating. The totals are priced against the customer's contract: the rate card or tiers, any included amount, commitments and negotiated rates.
- Invoice. Each rated total becomes an invoice line with its quantity, rate and period, and the usage behind it.
| Step | What goes wrong | The rule that prevents it |
|---|---|---|
| Event | The same event arrives twice | An idempotency key on every event |
| Meter | The meter adds up a quantity it should take the maximum of | One written aggregation rule per meter |
| Aggregation | Usage lands in the wrong month | Periods cut by when usage happened, in the contract's time zone |
| Rating | An old rate or the list rate gets used | Dated rates, with the contract's rates taking priority over list |
| Invoice | The customer can't check the line | Quantity, rate, period and usage rows on the line |
What does a meter count?
A meter counts one thing in one way: a sum, a count, a maximum, a count of unique items or a level averaged over time. Usage metering is that counting step, and its aggregation has to match how the contract defines the quantity, or a correct set of events still produces a wrong invoice.
| Aggregation | Example | Public pricing that uses it |
|---|---|---|
| Sum | Call minutes, tokens, gigabytes transferred | [OpenAI API, per million tokens](/blog/openai-api-pricing-explained/) |
| Count | API calls, messages sent | Most per-request API prices |
| Maximum | The highest seat or host count in the period | [Jira, billed on the cycle's highest seat count](/blog/jira-atlassian-pricing-explained/) |
| Unique count | Monthly active users | Per-active-user plans |
| Average over time | Gigabytes stored across the month | [AWS S3 storage, per GB-month](/blog/aws-s3-pricing-explained/) |
A wrong rule turns good data into a wrong bill. A customer who stores 100 GB for the first half of a 30-day month and 300 GB for the second half has stored an average of (100 × 15 + 300 × 15) ÷ 30 = 200 GB. A meter that adds up daily readings instead reports 6,000 GB. The meter entry has the short definition.
What are the common metered billing complications?
Metered billing errors mostly come from four places: duplicate events, usage that arrives after the period has ended, period boundaries cut in the wrong time zone, and disputes the invoice can't answer. Each has a rule that stops it before the invoice goes out.
Duplicate events and idempotency
A duplicate event is the same usage recorded twice, usually because a file was uploaded again, a sync re-read rows or a sender retried after a timeout. The fix is an idempotency key, an id that marks each event as unique so a second copy is recognised and skipped.
According to the IETF's Idempotency-Key header draft (version 08, October 2026, still a work in progress), an idempotency key is "a unique value generated by the client which the resource uses to recognize subsequent retries of the same request."
For usage files, build the key from the source's own event id where it has one. A key of customer plus date fails the first time the source sends two corrections for the same day. Idempotency in usage billing goes through choosing the key.
Late-arriving usage and period close
Late-arriving usage is usage that happened inside a billing period but reached the billing system after the period ended. Data pipelines handle this by keeping two clocks: when the event happened and when it arrived. According to the Apache Beam programming guide, "once the watermark progresses past the end of a window, any further element that arrives with a timestamp in that window is considered late data."
Billing needs the same idea as a close rule. Pick a close window, such as three days after the period ends, and draft the invoice only after it. Usage that arrives inside the window goes on that period's invoice. Usage that arrives after the invoice is issued goes on the next invoice as its own line, labelled with the period it belongs to, because issued invoices never grow new lines.
Price late usage at the rate and band of the period it belongs to. If March has already passed a tier threshold, late March minutes are priced at March's top band. Counted into April instead, they could fall inside April's included amount and bill nothing.
Time zones and period boundaries
A billing period has to end at a time in a time zone, and the contract should say which. Usage logs are often stored in UTC, while an Indian customer's month runs on IST, five and a half hours ahead.
Calls made between 00:00 and 05:30 IST on 1 April are dated 31 March in UTC, so a meter that cuts periods in UTC bills them in March while the customer's own records put them in April. A US customer spread across time zones runs into the same question, on a smaller scale.
Disputes over metered usage
A metered billing dispute is a customer saying the quantity is wrong, and the way to settle it is to compare the two counts row by row. Send the usage rows behind the line first, then work through the usual causes:
| Cause | What the customer sees | Fix |
|---|---|---|
| Duplicate events | Your count is higher by a repeated batch | Remove the duplicates by key and credit the difference |
| Test or internal traffic | Usage on days they say they were idle | Exclude it by a flag the contract defines |
| Time zone boundary | Totals differ at both ends of the month | Re-cut the period in the contract's time zone |
| Wrong rate | The quantity matches but the amount doesn't | Re-rate at the dated contract rate |
| Unlabelled late usage | A line for a month they thought was closed | Label late usage with its period |
Correct a wrong invoice with a credit note or an adjustment invoice, and leave the one you sent as it is.
India sets the rules for those corrections in law. Under section 34 of the CGST Act, as published by CBIC, a supplier may issue a credit note when the taxable value on a tax invoice turns out higher than the value of the supply, or the services are found to be deficient.
The credit note has to be declared in a return no later than "the thirtieth day of November" after the end of the financial year, or the date of the annual return if that's earlier. When the invoice understates the value, the Act calls for a debit note, which "shall include a supplementary invoice", so late usage for a month already invoiced can go out on one.
The US has no federal invoice rule like this, and a credit memo or new invoice follows your own policy and any state sales tax that applied. This is general information. Confirm the treatment for your business with your auditor or tax adviser.
Worked example: one month of usage
Example: Halden Voice, an invented voice AI company, bills Corvane Systems, an invented IT services company, under a contract with three priced terms:
- Platform fee: $500 a month, billed in advance, including 10,000 call minutes a month.
- Call minutes above the included 10,000: $0.030 a minute up to 100,000 minutes in the month and $0.025 above that, graduated, billed in arrears.
- Phone numbers: $2 a month for each number, on the highest count active in the month.
The contract sets a three-day close, so March usage that arrives by 3 April goes on the invoice dated 4 April. By the close, the March file holds call records totalling 132,400 minutes, and two corrections come before rating:
- A batch of 1,800 minutes was uploaded twice after a timeout. The idempotency key skips the second copy.
- 400 minutes are internal test calls, which the contract excludes.
Billable March minutes are 132,400 − 1,800 − 400 = 130,200. After the 10,000 included minutes, 120,200 are priced: 90,000 in the first band and 30,200 above 100,000. The highest count of active phone numbers in March was 48.
| Line | Period | Calculation | Amount |
|---|---|---|---|
| Platform fee, including 10,000 minutes | 1 to 30 April | Flat | $500.00 |
| Call minutes, included | 1 to 31 March | 10,000 of 130,200 minutes | $0.00 |
| Call minutes, 10,001 to 100,000 | 1 to 31 March | 90,000 × $0.030 | $2,700.00 |
| Call minutes, above 100,000 | 1 to 31 March | 30,200 × $0.025 | $755.00 |
| Phone numbers | 1 to 31 March | 48 × $2 | $96.00 |
| Total before tax | $4,051.00 |
On 6 April, two days after the invoice went out, 500 more March minutes arrive from a delayed export. They go on the May invoice as "Call minutes, March, late usage": 500 × $0.025 = $12.50, at March's top band, since March had already passed 100,000 minutes. Counted into April, they'd have landed inside April's 10,000 included minutes and billed nothing.
The 500 late minutes were used in March, so they're March revenue. If March's books are still open on 6 April, accrue the $12.50 as unbilled revenue.
According to the FASB's ASU 2014-09, the update that created ASC 606, when a company's right to payment "corresponds directly with the value to the customer of the entity's performance completed to date", it "may recognize revenue in the amount to which the entity has a right to invoice" (paragraph 606-10-55-18). That practical expedient is why per-unit usage revenue usually lands in the month the usage happened. IFRS 15 and Ind AS 115 carry the same expedient.
How should usage show on the invoice?
A metered invoice line should let the customer's finance team redo it from their own records. That means showing:
- The meter and its unit, such as call minutes.
- The period the usage belongs to, which for late usage isn't the invoice's own period.
- The quantity, and how much of it was included.
- The rate, or each tier band as its own line.
- The usage rows behind the line, attached or a click away.
Sonic's Metering agent rates usage from your database or file uploads onto invoice lines, and attaches the usage behind each line to the invoice. Tiered pricing shows how graduated and volume bands read on the invoice.
When doesn't metered billing fit?
Metered billing fits poorly when nobody can trust the meter yet, when the customer's budget needs a fixed number, or when the metered amount is too small to be worth counting. A flat fee, a commitment or prepaid blocks usually work better in those cases.
- No reliable source of usage. If the events come from a system nobody owns, or the customer can't see the same data, start with a flat fee or a commitment until the meter is right.
- A purchase order with a fixed value. Many enterprise buyers raise a purchase order for a set amount and can't pay an invoice above it. Prepaid blocks or a commitment fit that process.
- Usage that's tiny next to the fee. Metering $30 of usage on a $10,000 annual contract costs more to run and explain than it earns.
- Seats treated as events. Seat counts change daily and need snapshots and confirmation rules instead of event counts; seats are snapshots, not vendor deltas explains why.
A checklist for each new meter
Before a new meter goes on a contract, write down these eight things:
- The unit and the aggregation rule: sum, count, maximum, unique count or average.
- The idempotency key, built from the source's own event id.
- What's excluded, such as test traffic, failed calls and internal accounts.
- The time zone the period is cut in, written into the contract.
- The close window, and the rule for usage that arrives after it.
- The rate card or tiers, with dates, and the band late usage is priced at.
- What an invoice line shows, and how the customer gets the usage rows.
- The dispute window, and whether corrections go out as credit notes or adjustment invoices.

Written by
Supreet Gupta
Co-founder, Sonic AI · LinkedIn
Supreet is a Cofounder at Sonic AI. Before starting Sonic, Supreet was a Product Manager at SaaS Labs (Sequoia funded Series B startup) where he worked with enterprises in US and Europe to deliver communication solutions. He completed his bachelors from IIT Bombay.


