Skip to main content Billable metrics define what you measure in your product. Every unit of consumption - tokens, compute hours, storage - starts as a metric.
Core Concepts
A billable metric is simply a measurable unit. It doesn’t have a price - that comes later when you create plans.
Each metric belongs to exactly one product and specifies:
Name - What customers see (e.g., “Input Tokens”, “GPU Hours”)
Unit - How it’s measured (e.g., “tokens”, “hours”, “GB”)
Mode - How it’s billed (flat or usage-based)
Aggregation - How to sum usage (currently SUM only)
Billing Modes
Usage Mode
Variable consumption tracked through events. Perfect for:
LLM tokens processed
Compute hours consumed
Data transferred
Queries executed
Report usage as it happens. Paygentic aggregates it per billing period.
Flat Mode
Fixed charges billed once per period. Use for:
Seats or licenses
Platform access fees
Base subscriptions
Support tiers
Charged at the start of each billing cycle.
Real-World Examples
LLM Service
Separate input and output for different pricing:
Metric: “Input Tokens” (usage mode, unit: “tokens”)
Metric: “Output Tokens” (usage mode, unit: “tokens”)
Metric: “Fine-tuning Hours” (usage mode, unit: “hours”)
Data Platform
Track different resource types:
Metric: “Storage” (usage mode, unit: “GB-hours”)
Metric: “Compute” (usage mode, unit: “vCPU-hours”)
Metric: “Queries” (usage mode, unit: “queries”)
Metric: “Active Users” (flat mode, unit: “users”)
Video Processing
Measure processing and delivery:
Metric: “Minutes Processed” (usage mode, unit: “minutes”)
Metric: “Bandwidth” (usage mode, unit: “GB”)
Metric: “Transcoding Jobs” (usage mode, unit: “jobs”)
Design Considerations
Granularity matters. Too many metrics complicate billing. Too few limit pricing flexibility.
Think about pricing evolution. Can’t split a metric later without migrating customers.
Customer clarity. Metrics should be intuitive and easy to understand on invoices.
Common Patterns
Tiered Resources
Create separate metrics for different resource classes:
“Standard Compute”
“Premium Compute”
“GPU Compute”
Direction-Based
Split bidirectional operations:
“Data Ingress”
“Data Egress”
Quality Levels
Differentiate service tiers:
“SD Video Processing”
“HD Video Processing”
“4K Video Processing”
Reporting Usage
Once metrics are defined, you’ll report usage through events. Each event includes:
Metric ID
Quantity consumed
Customer ID
Timestamp
Optional metadata
Paygentic handles aggregation, rating, and billing automatically.
Next Steps
After defining metrics:
Create plans to group your offerings
Set prices for each metric
Report usage as customers consume resources