TL;DR: Metered billing for APIs depends on trustworthy usage events, idempotency, and replayable aggregation, because flat request counts are not enough to support finance-grade invoicing or dispute handling, according to Kong. The real governance issue is separating enforcement from accounting so retries, late data, and clock skew do not corrupt revenue recognition.
NHIMG editorial — based on content published by Kong: Metered Billing for APIs: Architecture, Telemetry, and Real-World Patterns
By the numbers:
- 85% of surveyed companies either already had usage-based pricing or were planning to adopt it, with 78% of companies with UBP adopting it within the last five years.
Questions worth separating out
Q: How should teams track API usage accurately for metered billing?
A: Track usage with immutable events that include a stable customer identity, a unique event ID, quantity, and timestamp.
Q: Why do retries and duplicates create billing risk in API platforms?
A: Retries can turn one billable action into multiple records unless the pipeline deduplicates them deterministically.
Q: When should organisations use gateway measurement instead of application measurement?
A: Use gateway measurement when you need centralised visibility, consistent authentication context, and low-friction instrumentation.
Practitioner guidance
- Separate enforcement from accounting Run rate limiting as a service protection control and metering as a financial evidence pipeline.
- Make every usage event replayable Capture customer ID, meter name, quantity, timestamp, and event ID in an append-only stream.
- Enforce idempotency at ingestion Deduplicate retries, queue redelivery, and late replays before they reach aggregation or billing.
What's in the full article
Kong's full blog post covers the operational detail this post intentionally leaves for the source:
- Step-by-step architecture patterns for event pipelines, including gateway, application, and stream-processing components
- Concrete examples of aggregation windows, correction workflows, and settlement handling for billing-grade systems
- Practical discussion of late data, clock skew, and proration decisions in real implementation scenarios
- Additional comparison of approximate versus exact aggregation for real-time dashboards and final invoices
👉 Read Kong's guide to metered API billing architecture and telemetry →
Metered API billing: where telemetry, idempotency and invoices meet?
Explore further