Skip to main content
The recurring setting controls what happens to a billable metric’s measured quantity when a billing cycle ends. Use recurring: true when the quantity should continue into the next cycle, such as the number of active seats. Use recurring: false when you want to measure each cycle separately, such as the number of API calls.

Keep the quantity with recurring: true

Use this setting for quantities that remain relevant across billing cycles. For example, you track seats with a Count unique metric using seat_id. Your customer adds five distinct seats in January. Those five seats carry into February. If the customer adds two more distinct seats and removes none, the measured quantity becomes seven. Set recurring to true when creating the metric.
Seats

Reset the quantity with recurring: false

Use this setting to measure usage separately for each billing cycle. For example, your api_calls metric counts 2,000 calls in January. At the end of January’s billing cycle, the count resets. If your customer makes 1,500 calls in February, February’s measured quantity is 1,500. Set recurring to false when creating the metric.
API calls

Supported aggregation types

Count unique, Sum and Weighted sum support both settings. Count, Max and Latest require recurring: false. See Aggregation types to choose how Lago calculates the quantity.

Aggregation types

Compare how aggregation types measure usage.

Create billable metrics

Define what to measure and how to calculate it.

Create a billable metric (API)

POST /billable_metrics

Billable metric object (API)

Explore the metric’s fields.