Usage-Based Billing

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:

  1. Ingest Usage Events — Raw consumption data flows into BillHive via API, batch API, CSV import, or manual entry
  2. Configure Addon Pricing — Aggregation rules (event type, aggregation method, filters) are configured directly on addon prices with Per Unit or Volume pricing models
  3. 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

ConceptDescription
Usage EventA discrete consumption action (API call, GB stored, message sent, token processed)
Addon Price UBB ConfigAggregation settings (event type, method, property, filters) configured on an addon price
Included QuantityBaseline consumption bundled with an addon price at no extra charge
OverageConsumption beyond the included quantity, billed at the addon price’s per-unit rate
AggregationThe method used to combine usage events over a billing period (SUM, COUNT, MIN, MAX, AVG)
Usage AggregationA 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

LimitValue
Usage events per month100M
Maximum event size1 KB
Event ingestion throughput1,000 events/sec

Higher limits are available upon request.