Product
, the next step is to determine what you will measure and charge for. This is done using Billable Metrics
.
Billable Metric
represents a quantifiable unit of usage or outcome related to your Product
that you intend to bill your Customers
for.
Billable Metric
belongs to a specific Product
.Customer
uses or achieves, you need to define it as a Billable Metric
.
Billable Metric
itself does not define a price. It only defines what is being measured.
Billable Metric
: What you measure (e.g., API requests).Price
: How much you charge per unit of that metric (e.g., $0.001 per API request).Prices
and group them into Plans
. A single Billable Metric
can have different Prices
in different Plans
.
Billable Metric
, you need to specify:
productId
: The ID of the Product
this metric belongs to.name
: A short, descriptive name for the metric (e.g., API Requests
, Input Tokens
). This might be shown to customers.description
: A brief explanation of what the metric represents.unit
: The unit of measurement (e.g., requests
, tokens
, GB
, hours
). This is primarily for display purposes on invoices and dashboards.aggregation
: How usage should be aggregated over a billing period. Currently, only SUM
is supported. This means Paygentic will sum up all the reported quantities for this metric within the billing period to calculate the total usage.Product
named “My LLM Service”.Billable Metrics
associated with this Product
:
name
: Input Tokens
unit
: tokens
aggregation
: SUM
name
: Output Tokens
unit
: tokens
aggregation
: SUM
Plan
, you would define separate Prices
for each of these Billable Metrics
(e.g., $0.000001 per Input Token and $0.000002 per Output Token).
With your Billable Metrics
defined, the next step is to set their cost using Plans and Prices.