Billable-Event Metering
also called Contract-Aligned Metering, Obligation-Point Metering
Recording the event a contract actually charges for at the point in the system where that obligation is created, rather than inferring it from delivery telemetry that caching and retries make unreliable.
A product licenses stock imagery on a per-use royalty and reports usage from its asset delivery logs. For two years the numbers agree with the vendor's expectations. Then a caching layer is added, thumbnail generation is moved to a pipeline, and clients start storing assets locally. Reported uses fall while actual uses rise, and a vendor audit finds the gap. The meter was attached to bytes moving, and the contract charges for something else entirely.
Billable-event metering is the discipline of finding the point in the system where the contractual obligation is created, emitting a durable event there, and billing or reporting from that stream. It applies to content royalties, per-transaction supplier fees, per-seat and per-environment software terms, per-API-call quotas, and any usage-based bill a customer or vendor can dispute.
Why it matters
Delivery telemetry and contractual events diverge in both directions, and every performance improvement widens the gap. Caching removes exactly the evidence a request-log meter depends on, so the better the system gets, the more wrong the number becomes. Retries, prefetch and preview renders push it the other way, inflating the count with events that are not uses.
The exposure is asymmetric. Over-reporting costs money quietly. Under-reporting is a contractual breach discovered by an audit, often with back-payment and penalty terms, and it arrives as a legal matter rather than as a dashboard alert. A meter that is approximately right is acceptable for capacity planning and unacceptable for an obligation with audit rights attached.
Implementation patterns
- Locate the obligation point. Ask what sentence in the contract creates the charge, then find the code path where that becomes true. For a per-use royalty it is the commit of an asset into a saved or exported artefact, not its download.
- Emit an idempotent event keyed on the thing that makes it unique (design version and asset identifier, transaction id, seat and period), so a retried operation does not double-count.
- Keep the raw event stream for at least the audit retention period in the contract, separate from analytics, with its own retention rule.
- Separate metering from rating. One event stream, a rules layer per vendor or plan, so a contract change is a configuration change and historical events can be re-rated.
- Reconcile against the invoice on a cycle and alert on drift beyond a tolerance, which is how a metering bug is found in days rather than at audit.
- Version the meter. When the obligation point moves, record which version produced each event, or the historical series becomes unexplainable.
Industry example
Media-heavy design products at the scale of Canva face this directly: licensed fonts and stock assets carry per-use terms while the delivery path is a CDN designed to serve as few origin requests as possible, so the two counts cannot be reconciled once caching is in place. The same pattern is visible in cloud marketplace and usage-based software billing, where vendors publish metering requirements precisely because inferring usage from infrastructure telemetry has proved unreliable since usage-based software pricing became common in the 2010s.
Failure scenarios
- The meter sits behind a cache, so the reported number falls whenever the system is improved.
- Non-idempotent events, so retried exports and replayed queues inflate the bill.
- Sampling an obligation. A 1% sample has an error band no auditor accepts, and the error is biased because popular and long-tail assets have different cache behaviour.
- Metering and rating fused together, so a pricing change requires a code change and history cannot be re-rated.
- The event stream is treated as analytics data and hits a 30-day retention policy set by someone who did not know the contract requires seven years.
- A refactor moves the obligation point and nobody notices until the totals step.
Trade-offs
| Choose | Gains | Pays |
|---|---|---|
| Meter at the obligation point | Defensible under audit and stable across infrastructure change | A durable pipeline with correctness, retention and reconciliation obligations |
| Infer from delivery telemetry | Free, already exists | Diverges the moment a cache or retry appears; indefensible under audit |
| Negotiate a flat-rate contract | No metering at all | A price that assumes the vendor's worst case for your usage |
When not to use it
Do not build a metering pipeline for a flat annual fee, a small library you own outright, or a vendor with no audit rights and a bill too small to appear in gross margin. The pipeline is permanent infrastructure and its correctness obligations never end. The practice pays when the line is material, when a contract grants audit rights, or when the same events will be re-used to bill your own customers. If usage is hard to meter and the vendor will negotiate, a flat-rate or tiered contract can be the cheaper answer even at a worse headline price.
Interview question
Q: Your per-use royalty reporting is derived from CDN access logs. Exports have grown fivefold and the vendor says your numbers are wrong. What do you change, and what do you refuse to do?
What a strong answer covers: the distinction between a delivery and a licence use; why caching makes the two irreconcilable rather than merely noisy; moving the meter to the commit or export point with an idempotency key; refusing sampling for an audited obligation; and separating metering from rating so a contract change does not need a deployment.
Quick check
Quiz: Why does adding a CDN cache make a request-log royalty meter worse rather than better? It removes origin requests without removing uses, so reported usage falls while actual usage rises, which is under-reporting a contractual obligation.
Flashcard: Where should a per-use royalty be metered? At the point the obligation is created, such as committing the asset into a saved or exported design, with an idempotent key so retries do not double-count.