.jpg)
Consumption Pricing: How It Works + Implementation Guide
Learn how consumption pricing works, the infrastructure it requires, and how engineering teams implement usage-based pricing.
Metered billing breaks when systems drift. Learn how to manage usage, pricing, and enforcement without constant debugging or billing issues.
.png)
Multi-dimensional metering, credit ledgers, and hybrid overage enforcement each introduce their own failure modes, and they compound as pricing models evolve. These examples break down what each model demands at the infrastructure layer.
Metered billing is a pricing model where charges are calculated based on actual usage. Instead of a fixed fee, the system tracks consumption and applies pricing rules to determine what a customer owes.
At a system level, metered billing ties billing directly to measurable events:
Each of these events must be captured, attributed to a customer, and translated into billable units.
AWS built its pricing around usage from the start. Instead of fixed contracts, customers pay based on actual consumption across compute, storage, and data transfer. This model helped AWS reach 32.4% market share in Q4 2019.
One example is Amazon S3. Pricing depends on how much data you store and how often you access it:
This goes beyond simple usage tracking. AWS is constantly measuring different types of usage, figuring out what bucket they fall into, and pricing them correctly. At that point, billing is tightly tied to how your system works under the hood.
Metered billing works by tracking usage events, aggregating them over a billing period, applying pricing rules, and generating an invoice based on that consumption.
It sounds straightforward, but each step depends on systems that need to stay consistent under load.
Usage tracking is where everything starts. If you get this wrong, nothing downstream matters.
Every billable event needs to be captured at the moment it happens, tied to the right customer and subscription, and stored in a way you can audit later. In practice, this usually means an event pipeline with ingestion, validation, and durable storage.
The tricky part is reliability. Events don’t behave cleanly in production, so your system needs to handle:
This is why you need idempotency and deduplication built into the pipeline. Miss events and you lose revenue. Double count and you lose trust.
The billing cycle defines when you stop counting and start charging.
Monthly is common, but some systems move to daily or near real-time billing. The complexity shows up when state changes mid-cycle. Upgrades, downgrades, cancellations, or plan changes all require splitting usage and applying the correct pricing to each segment.
This is where simple “count and multiply” logic breaks. You need time-aware aggregation.
Rate determination is where usage becomes money.
At a basic level, you map units to price. In reality, pricing is rarely flat. You have tiers, volume discounts, feature-based pricing, and sometimes contract-specific overrides.
For example, the first million API calls might cost one rate, the next ten million another. That means your system needs to track total usage and where that usage falls within pricing thresholds.
This logic has to be deterministic and consistent. If the same usage produces different charges in two systems, you have a reconciliation problem.
Invoice generation is the final step, but it depends on everything upstream being correct.
The billing system takes aggregated usage, applies pricing rules, and produces an invoice. Tools like Stripe, Chargebee, or Zuora handle invoicing and payments, but they rely entirely on the accuracy of the usage data you send.
If your aggregation or pricing logic is off, the invoice will be wrong. The billing platform won’t fix that for you.
Customers need to see what you’re charging them for before the invoice shows up.
Real-time usage dashboards, alerts, and detailed line items reduce surprises and support tickets. Without visibility, every unexpected charge becomes a support issue.
This also means your internal numbers and customer-facing numbers have to match. If they don’t, you’ll spend time debugging instead of shipping.
Most failures come from small mismatches between systems, such as:
Metered billing only works when tracking, aggregation, pricing, and billing stay in sync. When they don’t, the issue shows up in your invoices, and by then it’s already customer-facing.
Metered billing and usage-based billing both charge based on consumption, but they differ in where usage is processed and how pricing logic is applied.
With metered billing, your system is responsible for turning raw events into billable units. That means building and maintaining:
Every pricing change touches this pipeline. Switching from per-call to per-token billing, for example, usually means rewriting aggregation logic and backfilling data.
With usage-based billing, you send raw events instead of pre-aggregated totals. The billing platform ingests those events and applies metric logic internally.
That shifts complexity out of your pipeline, but introduces different concerns:
In practice, the choice depends on where you want that complexity to live. Metered billing keeps control in your system. UBB pushes more logic into the billing layer.
Platforms reflect this split. Stripe Billing follows a metered billing approach, while Metronome, now part of Stripe's product suite following its 2026 acquisition, is built for event-driven usage-based billing.
In both cases, entitlements are handled separately. Billing tracks and charges for usage, but enforcement of limits happens in a different layer before billing ever sees the data.
Most teams underestimate the scope of a metered billing implementation. The billing platform handles invoice generation and payment processing. Everything upstream is your problem.
The systems your team has to build or maintain include:
Miro shipped a metered billing and credits implementation in under 6 weeks with Stigg, work that would otherwise have taken quarters to build and maintain in-house. The team saved 5,000 engineering hours by adopting Stigg rather than extending and maintaining that infrastructure themselves. The gap between estimate and reality is common. The initial scope rarely accounts for edge cases that only appear at scale.
Metered billing makes sense when usage varies significantly across customers, and when that variation is material enough that flat-rate pricing would be unfair to one side.
Use metered billing when:
Metered billing usually isn’t worth it when:
AI products have made metered billing more common in SaaS. LLM inference has direct marginal costs: more tokens consumed means more compute spent. That cost structure makes flat-rate pricing difficult to sustain at scale.
Segment8 reported a case where a single customer generated a $67,000 bill from runaway usage. Without limits in place, usage can scale faster than expected. That’s what pushes teams toward metered billing and enforcement layers that cap or throttle usage in real time.
Entitlements work by defining and enforcing usage limits before any billable activity is recorded, so that metered billing only tracks allowed consumption.
Metered billing tracks usage and generates invoices. It does not control access. That happens in the entitlements layer.
In a metered system, entitlements act as the guardrails for usage:
These limits are enforced at runtime, before the request is processed. If a customer exceeds their entitlement, the system can block, throttle, or prompt for an upgrade.
Entitlements can come from multiple sources:
When multiple sources apply, the system resolves them into a single effective limit.
An entitlement check returns structured data used during request handling:
This data is used directly in the request path:
This is what connects metered billing to real system behavior. Billing happens after usage, but enforcement happens before it. Without this layer, metered billing can track usage, but it cannot control it.
Credits are a prepaid version of metered billing. Instead of charging at the end of a cycle, customers buy credits upfront and spend them as they use the product.
In AI systems, this is common because usage is tied to tokens, compute, or model calls.
Supporting credits requires more than tracking usage:
Depletion behavior also needs to be defined:
Every transaction must be written to an append-only ledger. This ledger is used for:
This is where most teams underestimate the work. You need a system that accurately tracks credit state, burn order, and history.
Stigg handles this with built-in support for credit blocks, expiry, burn order, and ledger tracking, so teams don’t have to build and maintain it from scratch.
Stigg handles the product-facing layer of metered billing. It defines what customers can access, how much they can use, and tracks that usage before billing.
Billing platforms handle invoices, tax, compliance, and payments. Stigg sits upstream of that.
Typical stack:
Stigg integrates with billing; it doesn’t replace it. Billing systems process charges, whereas Stigg controls access and usage.
For teams with data residency requirements, the enforcement layer needs to run inside their own infrastructure. A BYOC deployment keeps entitlement data within the VPC and removes any dependency on external uptime for read-path decisions.
Stigg uses a sidecar architecture for low-latency enforcement:
This keeps entitlement checks fast enough to run in the request path without adding noticeable latency.
Most teams start with a simple setup that works early on, but complexity builds over time.
What starts as a quick solution turns into a system that requires ongoing maintenance and coordination across teams. That’s usually the point where teams either rebuild internally or move to a dedicated solution.
Enterprise accounts run teams, departments, products, and agents that all draw from shared budgets simultaneously. The enforcement layer has to stay accurate and fast across all of it, or the checks get disabled and the protection disappears.
Stigg sits in the request path and enforces entitlements, credits, usage limits, and spend governance synchronously before compute runs.
Teams that only need the credit ledger or entitlement enforcement layer can adopt either component independently. There’s no requirement to use the full stack.
Engineering teams that have outgrown homegrown metering or are building this layer for the first time should see how Stigg’s runtime layer fits into their stack.
You track usage accurately in metered billing by capturing every billable event with unique identifiers and storing it in a reliable event pipeline. Most systems use idempotency keys and deduplication logic to prevent double-counting or missing events.
Common metered billing mistakes include relying on incomplete usage tracking, skipping deduplication, and not handling mid-cycle changes correctly. These issues often lead to billing discrepancies and customer disputes.
No, metered billing cannot reliably work without real-time enforcement if you need to control usage. Without enforcement, customers can exceed limits before billing catches up, which creates risk for both cost and system performance.
You test a metered billing system by simulating real usage patterns, including retries, spikes, and failures. Teams also validate aggregation logic and compare system-generated usage against raw event logs to ensure accuracy.
The main difference between usage limits and billing limits is that usage limits control access in real time, while billing limits only affect how charges are calculated after usage occurs. Usage limits prevent overconsumption, while billing limits do not.