Metered billing architecture is the set of systems that capture, normalize, rate, and invoice usage events for usage-based pricing. The primary choices—synchronous vs. asynchronous rating, event store, aggregator, and vendor integration—define your accuracy, latency, and operational cost profile.
A single bad architecture decision can convert recurring revenue into chargebacks, refunds, and a decade of edge-case engineering. Expect 1–3% of invoices to need manual review the first year after launch unless you invest in reconciliation and observability; that cost often shows up as $40k–$250k in human time and lost revenue annually.
Direct answer: Metered billing architecture should be synchronous only when a real-time decision matters (latency budget ≤200ms); otherwise use an event-driven, asynchronous pipeline with 1–60 second aggregation windows. For most B2B SaaS with <100M events/day, buying a vendor + 0.5 FTE integration costs $100k–$350k over three years, while building in-house costs $1.0M–$1.6M over three years.
Metered billing architecture
A practical metered billing architecture has five stages: ingestion (webhooks, SDKs, proxies), normalization (schema, dedup keys), enrichment (account mapping, plan lookups), rating (price table lookup, bundles, caps), and settlement (invoices, refunds, analytics). Each stage introduces latency and error modes: ingestion spikes break real-time rating; enrichment failures cause misbilling; rating rule churn creates reconciliation load.
Choose your event backbone first. Kafka or Kinesis for high-throughput, low-latency (100–500ms tail) is standard at 10k+ events/s. Confluent Cloud list-prices start around $6k/month for small clusters; self-hosted Kafka on EC2 with 3 brokers and 1 TB EBS usable will cost roughly $3k–$8k/month in compute and storage for production durability. For lower volume (under 1M events/day), SQS + S3 with periodic batches reduces cost to <$1k/month.
Rating choice drives infra. If rating must be synchronous at request time (API call must return a quota/balance), you need in-memory lookup: Redis or a purpose-built state store with <50ms p95. A Redis cluster with HA and persistence runs $800–$2,500/month. If you can tolerate async rating, aggregate into ClickHouse or Snowflake for cost-effective rollups: ClickHouse on a modest node is ~$1,200/month; Snowflake consumption at 1–10 TB/month ranges $1,500–$15,000/month.
Accuracy targets are business rules. Set an SLA: 99.99% integrity on billed lines and ≤0.1% late/missed usage. Failure to meet that drives direct financial loss. For a $5M ARR SaaS, a 0.5% billing error rate is $25k/yr; for a $25M ARR company that's $125k/yr and erodes trust faster than product issues.
Vendor integrations change the math. Stripe Billing supports usage records and metered plans and removes invoicing work but not event ingestion or normalization. Chargebee and Zuora add advanced rating and bundling but at $2k–$10k/month plus per-invoice fees. A vendor-first approach typically costs $24k–$120k/year plus Stripe fees; engineering integration is 0.25–1.0 FTE during rollout.
Build metering only when your usage logic is a product differentiator or your scale makes vendor costs exceed the fully loaded engineering + infra bill.



