Usage-Based Billing Overview

Usage-based billing charges customers based on actual consumption of products or services. Instead of paying a flat recurring fee, customers pay for what they use — whether that is API calls, storage consumed, messages sent, tokens processed, or seats activated.

Why Usage-Based Billing?

  • Fair pricing — Customers pay proportionally to the value they receive
  • Lower barrier to entry — Small customers start with low costs and scale naturally
  • Revenue alignment — Revenue grows with customer adoption and success
  • Flexibility — Supports diverse business models across SaaS, infrastructure, communications, and AI/ML services

Architecture

BillHive’s usage-based billing pipeline consists of three stages:

Usage Events ──> Metered Features ──> Pricing & Invoicing
   (raw data)      (aggregation)       (billing)

Stage 1: Usage Event Ingestion

Raw consumption data enters BillHive as usage events. Each event represents a discrete action — an API call, a file upload, a message delivered. Events are schema-less, meaning they accept arbitrary properties as JSON without requiring predefined templates.

Ingestion methods:

  • REST API (single event or batch)
  • CSV bulk import
  • Manual UI entry

Stage 2: Metered Features

Metered features define how raw events are aggregated into billable units. A metered feature specifies:

  • Which event type to track
  • Which property to aggregate (e.g., quantity, tokens, bytes)
  • The aggregation method (SUM, COUNT, MIN, MAX, AVG)
  • Optional filter conditions to narrow the event stream

Example: A metered feature “API Calls” might COUNT all events of type api_request where endpoint != /health.

Stage 3: Pricing & Invoicing

Metered features are linked to plans and add-ons with:

  • Included quantity — units bundled at no extra charge
  • Overage rate — per-unit price for consumption beyond the included quantity

At billing cycle end, BillHive aggregates usage, subtracts included quantities, applies overage pricing, and generates invoice line items automatically.

Supported Billing Models

ModelDescriptionExample
Fixed Fee + OveragesBase fee includes N units; excess charged per unit$70/mo for 40 tasks, $1.50/extra task
Pay-As-You-GoNo base fee; billed purely on consumption$0.03 per character translated
HybridCombines recurring fees with usage components$99/mo base + $0.01 per API call

Prerequisites

Before setting up usage-based billing, ensure:

  1. Product families, plans, and add-ons are configured in the Rate Plan Builder
  2. Plans or add-ons intended for usage billing are marked with the Usage charge type
  3. Supported currencies and billing frequencies are configured