Usage-Based Billing
Usage-based billing (UBB) enables businesses to charge customers based on actual consumption rather than flat subscription fees. BillHive supports flexible usage-based billing that can operate as pure pay-as-you-go, fixed fee with overages, or hybrid models combining both approaches.
How It Works
Usage-based billing in BillHive follows a three-stage pipeline:
- Ingest Usage Events — Raw consumption data flows into BillHive via API, batch API, CSV import, or manual entry
- Configure Addon Pricing — Aggregation rules (event type, aggregation method, filters) are configured directly on addon prices with Per Unit or Volume pricing models
- Automatic Billing — At billing cycle end, BillHive aggregates events per addon price configuration, applies included quantities and overage rates, and generates invoice line items
Key Concepts
| Concept | Description |
|---|---|
| Usage Event | A discrete consumption action (API call, GB stored, message sent, token processed) |
| Addon Price UBB Config | Aggregation settings (event type, method, property, filters) configured on an addon price |
| Included Quantity | Baseline consumption bundled with an addon price at no extra charge |
| Overage | Consumption beyond the included quantity, billed at the addon price’s per-unit rate |
| Aggregation | The method used to combine usage events over a billing period (SUM, COUNT, MIN, MAX, AVG) |
| Usage Aggregation | A computed record storing raw, included, billable quantities and amount for a billing period |
Pricing Models
BillHive supports three usage-based pricing approaches:
- Fixed Fee + Overages — A base subscription fee includes N units; consumption beyond that is charged per unit. Example: $70/month for 40 automated tasks, then $1.50 per additional task.
- Pay-As-You-Go (PAYG) — Customers are billed only for what they use with no base fee. Example: $0.03 per character translated.
- Hybrid — Combines recurring flat fees with usage-based components in a single subscription.
Architecture
UBB configuration lives directly on addon prices (Per Unit Pricing or Volume Pricing models). There is no separate “metered feature” entity — the addon price itself defines:
- Event Type — Which usage events to aggregate (e.g.,
api_call) - Aggregation Method — How to combine events (SUM, COUNT, MIN, MAX, AVG)
- Aggregation Property — Which event property to aggregate (required for SUM/MIN/MAX/AVG)
- Filters — JSON key-value conditions to narrow the event stream
This design keeps billing configuration co-located with pricing, making it straightforward to set up and manage.
Platform Limits
| Limit | Value |
|---|---|
| Usage events per month | 100M |
| Maximum event size | 1 KB |
| Event ingestion throughput | 1,000 events/sec |
Higher limits are available upon request.