Skip to main content

Billing Model Overview

Billing (PBM) is built around billing subscriptions on one side and usage events with aggregation on the other. Both paths converge at billing transactions, which link subscription activity to invoice generation. Understanding how these pieces fit together is the key to understanding how Raytio handles recurring and metered billing.

The big picture

Core concepts

ConceptPurpose
Billing subscriptionsCustomer billing agreements
Subscription linesLine items within a subscription, including price and quantity
Billing transactionsLinks subscription lines to generated invoice lines
Usage aggregation rulesRules defining how raw usage events are aggregated
Usage aggregation recordsAggregated usage totals per billing period
Usage eventsRaw metered activity used for usage-based billing

Two billing paths

PBM supports two distinct billing paths that both originate from subscription lines:

Fixed-price (recurring)

A subscription line references a PCM price with a fixed amount and a recurring billing interval. Each billing cycle, the system generates a transaction for the subscribed quantity multiplied by the price amount. No usage events are involved.

Usage-based (metered)

A subscription line references a PCM price that has an aggregation rule attached. Raw usage events are ingested, aggregated according to the rule, and the resulting accumulated quantity is used to calculate the charge.

Concept relationships

Common patterns

Billing records follow platform-wide conventions:

  • Tenant isolation — customers only see billing information for organisations they can access.
  • Audit history — billing activity records who created or changed important information and when.
  • Effective dating — subscriptions, rules, and overrides can be valid for specific periods.
  • Change protection — active billing records are protected from unexpected edits that would affect invoices or historical usage.