.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.
See how consumption-based billing works for AI products, from usage events and credit ledgers to real-time controls that stop runaway compute.
.png)
Consumption-based billing gets harder when AI usage keeps running after the customer should have stopped. A workflow starts on Friday, calls models all weekend, and shows up Monday as thousands of LLM calls and months of credits gone.
Billing recorded the usage correctly, and the invoice is accurate, but the problem is timing. AI products need a way to control usage while it is happening, before compute costs pile up.
Consumption-based billing charges customers based on what they use, unlike other methods that use a fixed monthly fee. The billing system ingests usage events, applies pricing rules, and generates an invoice based on consumption during the billing period.
Common consumption units include:
Flat subscriptions charge the same amount regardless of usage. Consumption billing ties the invoice directly to what the customer consumed.
Consumption-based billing and usage-based billing usually mean the same thing. Both describe pricing models where customers pay based on what they consume.
You may also hear related terms like metered billing or pay-as-you-go billing. Metered billing often refers to the event ingestion and aggregation layer, while consumption-based billing describes the broader pricing and billing model.
Consumption billing works as a usage pipeline that turns product events into invoice line items.
At a basic level, the system has four parts:
The hard part is keeping that pipeline accurate as usage grows. A simple metering table may work at low volume, but it gets harder when you add concurrent requests, customer hierarchies, credit balances, retries, late-arriving events, and real-time usage visibility.
That is where consumption billing becomes an engineering system that shapes how the product behaves and how usage is enforced.
There are several ways to structure consumption billing, and most AI products end up combining more than one.
Credit-based models deserve specific attention. They are the dominant pattern for AI products, and the engineering requirements are more complex than a single balance column.
The clearest examples of consumption billing done well are the infrastructure companies that got there first.
AWS charges per compute hour, per gigabyte of storage, and per API call across hundreds of services. The key engineering decision was separating compute and storage costs entirely, so customers can scale each independently. A team running a data-intensive workload pays for storage without paying for idle compute.
Snowflake went further by charging credits only when virtual warehouses are actively running queries. Idle warehouses incur no compute charges, and the billing model aligns with the product's actual marginal cost profile instead of relying on a proxy metric.
Anthropic charges per input and output token, with different rates by model. A developer running Claude Haiku for summarization pays a fraction of what they would for Claude Opus on a complex reasoning task. The billing model reflects real cost variance per request.
Cursor uses a flat subscription covering a base usage floor, with consumption billing layered on top for requests above the threshold. This is increasingly common for AI-native products that want subscription revenue predictability while still capturing value from high-usage customers.
Across all of these examples, the pricing unit matches the product's cost structure, and the billing model grows alongside customer usage instead of limiting it.
AI products need consumption billing because every LLM call carries a real marginal cost.
That cost changes based on the model, context length, output length, and the number of tool calls an agent triggers. A complex multi-step workflow can cost 50x more than a simple question from the same customer in the same session.
Flat pricing struggles with that variance. You either overcharge light users until pricing feels unfair, or undercharge heavy users until margins start to shrink. Consumption billing, on the other hand, ties revenue closer to the cost you actually incur.
The consumption patterns that matter most for AI products include:
The more variable the cost of each action becomes, the more important it is for pricing to follow actual usage instead of forcing every customer into the same flat fee.
Consumption billing tells you what was used, but it can’t decide what should have been allowed.
Billing platforms like Stripe, Orb, and Metronome record what happened and generate accurate invoices. The question "Is this customer allowed to run this action right now?" has to be answered before the action executes. However, metering answers it afterward.
For an AI product where a single session can overdraw the account, that problem comes up on every concurrent request.
Three specific scenarios where it shows up:
This means the enforcement layer has to be in the request path before compute runs.
Moving from a basic metering table to production-grade consumption billing involves more engineering than most teams estimate upfront.
At high request volumes, the ingestion pipeline has to absorb bursts without dropping or duplicating events.
Both mistakes are expensive. If usage is undercounted, revenue leaks. If usage is overcounted, the customer gets an invoice they don’t trust, and your team gets pulled into a dispute.
If you are running a credit-based model, the data model is more complex than a single balance column. Credits come in blocks with individual expiry dates and cost basis.
Promotional credits and paid credits burn in a defined order: promotional before paid, expiring before non-expiring.
Depletion behavior is either hard (blocks the action when the balance hits zero) or soft (allows the action and flags the overdraft). All of this requires an append-only ledger for reconciliation.
When the system checks a customer's balance, it needs a real-time view of usage. As request volume grows and more requests run at the same time, keeping that balance accurate becomes much harder.
Without careful cache invalidation and concurrency handling, two requests can draw from the same balance and let usage exceed the limit before the system catches up.
You need a check that runs before the action executes, resolves against a current balance, and returns fast enough that adding it to the request path does not degrade the product experience.
Enterprise customers do not just need an org-level balance. They need per-team allocations, per-agent budgets, per-product spend caps, and the ability to set hard limits at any level of the hierarchy independently.
Building consumption billing in-house is the default decision, and for a single product with straightforward usage patterns, it is often the right one. A credits table, a decrement function, and a usage events log get you further than you might expect.
The system starts breaking under specific conditions. Not at a particular ARR or headcount, but when:
Miro hit this point when they added AI credits to a product that already had a complex hybrid pricing model. A plan introduction that should have been straightforward became a multi-month cross-functional initiative.
After moving to Stigg, they recovered over 5,000 engineering hours and freed engineering from stepping in every time packaging changed.
Stigg is a usage runtime that gives AI products a control point before usage turns into cost. It checks entitlements, credits, limits, and spend rules while the request is still moving through the system, so compute only runs when the customer is allowed to use it.
After the model call, billing can only record the damage. In the request path, Stigg can still stop the runaway session.
If invoices are where you first discover runaway usage, the Stigg docs show how to move enforcement into the request path.
The main difference between consumption billing and subscription billing is that subscriptions charge a fixed amount regardless of usage, while consumption billing charges based on what was actually consumed.
For AI products with variable marginal costs per request, consumption billing aligns revenue with the cost of serving each customer.
A credit-based billing model lets customers purchase a balance upfront and draw it down with each billable action. Credits come in blocks with expiry dates, cost basis, and defined burn order. Hard depletion blocks the action when the balance hits zero; soft depletion allows it and flags the overdraft.
No, consumption billing records what was consumed and invoices after the fact. Real-time enforcement requires a separate layer that runs checks in the request path before actions execute.
For AI products where a single session can generate high cost, that distinction is the architecture decision worth getting right before the first runaway overage hits an invoice.