Usage Metering & Billing Pipeline  ·  View 06 of 22  ·  Structure

Layered Architecture

Six layers, and the two edges the layering does not already imply.

Editable source SVG draw.io All views
Experience Customer usage console Usage & invoice API Finance close console Pricing console Money Rating service Entitlement service Invoice run Anomaly gate Restatement orchestrator Metering Aggregation event-time windows Period close & watermark Baseline detector Ingestion Ingest API Validation & quarantine Dedup index Producer SDK & buffer Data Event ledger system of record Aggregate store Invoice ledger Plan registry Audit tail Platform Workload identity Keys & encryption Privileged-action log Observability Orchestration append replay Layered Architecture Application we own Interface / broker Decision point Data store Security / platform synchronous batch Reads flow upward, writes downward, so most edges are implied by the layering. The two drawn are the ones it does not say: every accepted event lands in the ledger, and every correction comes back out of it. v 1.0 · owner Architecture Practice · date 2026-10

Decisions

  • Metering and Money are separate layers rather than one billing layer. Measurement is physics and money is policy: they change at different rates, are owned by different people, and fail differently.
  • Nothing in the Money layer is authoritative. Every figure in it derives from the Data layer below, which is what makes a pricing error correctable rather than permanent.
  • The Platform layer is deliberately thin and holds nothing domain-specific, so a change of cloud primitive does not reach into the domain.

Reading it

  • Reads flow upward, writes downward, so most edges are implied. The two drawn are the ones the layering does not say: every accepted event lands in the ledger, and every correction comes back out of it.
  • Producer SDK sits in Ingestion rather than Experience because its durable buffer is part of the delivery guarantee, not a client convenience.

Risks

  • A layered picture invites a layered deployment. It is not one — view 16 shows the actual topology, and the Money layer's invoice run is a scheduled job, not a service.
  • The Experience layer's four surfaces have four different authorisation models; view 21 is where that is actually resolved.