B
Glossary
Billing Mediation
Billing mediation is the layer that sits between usage sources and billing, gathering records from systems that share no format, mapping them onto one schema, attaching the account and product context a charge depends on, then delivering a copy to every downstream consumer: the rating engine, analytics, and revenue share reporting.
Key Takeaways
Fan-out is the dividing line. Event ingestion finishes when one record lands in storage; mediation picks which other systems get a copy and answers for it when two consumers disagree on the total.
Point-to-point wiring grows as sources multiplied by consumers. Four sources feeding five consumers is 20 integration paths; one mediation layer between them cuts that to nine.
3GPP TS 32.298 defines CDR parameters and encoding, TS 32.297 defines CDR file format and transfer into the billing domain, and TS 32.240 sets the charging architecture. Titles checked 5 September 2026.
Correlation is the stage SaaS pipelines usually skip. Telecom mediation joins partial records from separate network elements into one chargeable session before any price applies.
Two sources, two consumers, and two customer identifiers is the threshold. Under it, mediation is a function call. Over it, a component.
What problem does billing mediation solve?
Mediation solves fan-out. Several systems produce usage, several more need the same usage, and none of them agree on field names, timestamps, units, or which identifier means "customer."
Without a middle layer, every source needs an adapter per consumer, so integration work multiplies instead of adding up. Four sources and five consumers is 20 paths to build and keep alive; mediation makes it four collectors plus five distributors, so nine.
Each consumer applies its own filters, so two of them can read one source and publish different numbers for the same period.
Source records rarely carry the account, plan, or contract period a charge depends on, so somebody attaches that context once instead of five times.
Consumer disagreement is where mediation departs from ingestion. An ingestion endpoint has done its job once a usage event is written. Mediation holds the canonical copy and the routing log, so it's the thing that gets called when finance and analytics show up at month end with two different totals.
What are the stages of a mediation pipeline?
A mediated record moves through six stages, and the last two carry the billing risk.
Collection. Pull from SFTP drops, queues, REST posts, element dumps, and warehouse tables, whatever protocol and schedule each source uses.
Validation. Quarantine malformed records where a human can inspect them, rather than dropping them silently.
Normalization. Map vendor field names, timestamp formats, units, and identifiers onto one internal schema.
Enrichment. Attach the account, subscription, product, and contract context the raw record never carried.
Correlation. Join separate records describing one chargeable action into a single unit, the way a session gets stitched from several elements' output.
Distribution. Deliver to each consumer under the filter and guarantee that consumer expects, then log what went where.
Telecom wrote these stages down first, because one phone call left records in several shapes across several boxes. Three 3GPP specifications carry the detail: TS 32.298 covers Charging Data Record parameters and encoding, TS 32.297 covers how CDR files move into the operator's billing domain, and TS 32.240 defines the charging architecture around both. Vendors shipped proprietary layouts outside those specs regardless, so commercial mediation still ships format libraries rather than one parser. Only after distribution does rating apply a price.
When does a SaaS team actually need a mediation layer?
Mediation earns a name, a schema, and an owner once you cross three counts at once.
Count | Glue code holds | You need a mediation layer
|
|---|---|---|
Usage sources | One instrumented service on one schema | Two or more: gateway logs, model provider callbacks, warehouse rows, product events |
Downstream consumers | One, the billing engine | Two or more, once finance, analytics, and pricing each read their own copy |
Customer identifiers | One canonical ID everywhere | Two or more, so a provider account ID has to resolve to a billing customer |
Cross one of those lines and a scheduled job is a fine answer. Cross all three and, in my experience, that job becomes the system of record by accident, with no schema, no replay story, and no way to walk a charge back to its source record. A usage reconciliation nobody can settle, because nobody can say which copy is authoritative, means you crossed the line a while back.
Related terms
These pages sit on either side of the mediated record:
Event ingestion covers the single hop from a source into the store.
Usage metering is the measurement system reading records mediation already cleaned.
Usage aggregation rolls those records up into one chargeable figure.
Rating (billing) is the consumer that turns the figure into money.
Usage reconciliation proves the distributed copies still match.
High-cardinality metering is what storage costs become once records carry too many distinct dimension values.
FAQ
How is billing mediation different from rating?
Mediation produces a trustworthy record and rating attaches a price to it. Mediation stops once a normalized, enriched record with the right customer on it has reached each consumer. A mediation defect surfaces as the wrong quantity on an invoice; a rating defect surfaces as a bad price applied to a good quantity.
Is billing mediation just an ETL job?
No, because mediation answers for money and a generic transform job doesn't. It knows what a subscription and a contract period are, it guarantees exactly-once counting, and it keeps a trail from any charge to its source record. An ETL job drops rows quietly, and nobody notices until two reports disagree.
What is a CDR in billing mediation?
A CDR, or Charging Data Record, is the telecom source record that mediation collects and converts. 3GPP TS 32.298 defines the parameters and encoding per CDR type, and TS 32.297 defines how CDR files reach the billing domain. The SaaS equivalent is a usage event from a gateway or a webhook.
Which system wins when two consumers report different totals?
The mediated record wins, which is why mediation stores one. Trace both totals back to it and the cause is usually a filter one consumer applied and the other didn't, or a batch one of them counted twice. Without that copy and its routing log, there's no arbiter at all.
Back to glossary
















