Billable metrics
Create billable metrics
Billable metrics define how incoming events are aggregated in order to measure consumption.
If you want to charge your customers for the use of a particular feature, then you should create the corresponding billable metric.
To add a new billable metric through the user interface:
- Enter its
name
; - Assign it a
code
which will be used as the name of the event sent from your backend; - Add a
description
(optional); - Select the
aggregation type
which will define how consumption will be measured; - Define the aggregation property
field_name
to aggregate on; - Define
groups
if you price several dimensions for a same billing component; and - Define if this billable metric is
recurring
and kept in memory period over period, or resume to 0 at the end of each period.
To add a new billable metric through the user interface:
- Enter its
name
; - Assign it a
code
which will be used as the name of the event sent from your backend; - Add a
description
(optional); - Select the
aggregation type
which will define how consumption will be measured; - Define the aggregation property
field_name
to aggregate on; - Define
groups
if you price several dimensions for a same billing component; and - Define if this billable metric is
recurring
and kept in memory period over period, or resume to 0 at the end of each period.
Here are few examples of billable metrics you can create:
The next section describes the different aggregation types. In addition to this, we have added some examples to help you understand the relationship between incoming events and billable metrics.