Skip to content
Switch from Chargebee in an afternoon →
Glossary

What is metered billing?

Definition

Metered billing is recording each customer's usage as events during a billing period and rolling those events up into one billable quantity at the end of the period.

How metered billing works

A meter defines one thing you measure, such as API calls, gigabytes stored or active users, and how a period's events turn into a single number. Your application sends an event whenever usage happens, tagged with the customer and a quantity.

At the end of the period the meter aggregates the events. The common aggregations are sum, which adds up every quantity; count, which counts the events and ignores their quantity; max, the highest value seen, for peaks like concurrent users; and last, the most recent value, for a gauge like seats in use at the end of the cycle. The result then goes through the price on the customer's subscription.

The aggregation changes the bill, so it is fixed when the meter is created. Switching it partway through would make old and new periods disagree.

Worked example

You meter API calls and charge $0.01 per call. In one period a customer's app sends three events: 100 calls, 250 calls and 80 calls.

Sum of quantities: 100 + 250 + 80
430 calls
Count of events
3 events
Charge with a sum meter: 430 × $0.01
$4.30

With a count meter the same period would bill 3 × $0.01 = $0.03, which is why the aggregation has to match what each event means.

Why metering matters

Metering is what makes a usage charge believable. A customer who questions a usage line wants to see the events behind it, and you want one source of truth for how the number was reached.

It also separates measuring from pricing. The meter records what happened; the price decides what it costs. You can change prices, add tiers or run a promotion without touching how usage is recorded.

Common mistakes

  • Sending running totals to a sum meter If each event carries the total so far, summing them counts the same usage many times. Send increments to a sum meter, or send the current total to a last meter.
  • No rule for late events Usage that arrives after the period closes needs a rule: bill it next period or reject it. Decide before it happens.
  • Duplicate events Networks retry. Give each event a unique key so a retry is not billed twice.
Questions

Metered billing, answered

What is a meter in billing?

A meter is the definition of one thing you measure and the rule for rolling a period's events into one number, such as summing API calls.

Should I send usage as events or as a total?

Send events for anything you add up: each event carries the increment. If you only know a current value, such as seats in use, send it to a meter that takes the last or the highest value.

Is metered billing the same as usage-based billing?

They are closely related. Usage-based billing is the pricing model; metered billing is how the usage is recorded and counted for it.

Start free. Pick a plan when it is working.