.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.
Pricing simulation helps you test pricing models before launch. This guide shows you how to validate entitlements, credits, and limits under real usage.
.png)
Credit tiers that work in staging break in production. Once agents run concurrently, wallets deplete faster than the enforcement layer can reconcile them. Token quotas that held at test volume collapse at real scale. This is the default failure mode for AI products.
This guide covers how to simulate pricing model behavior before launch, what conditions to test, and where enforcement systems typically fail when AI workloads hit them for the first time.
Pricing simulation is how you test pricing models before launch by defining the model in a product catalog, replaying real usage events, and validating how entitlements behave under load.
The key is testing against the same conditions the system will face in production, where usage is concurrent, state is shared, and enforcement happens in real time.
Move pricing logic out of the application and into something that can evaluate it at runtime. When plans and entitlements live in configuration, the app stops making pricing decisions directly and instead calls into a single place that evaluates them per request.
Entitlements define a few things:
For example, a free user might get 1,000 tokens per day, while a Pro user gets 50,000 tokens per day. Limits are enforced at the point the request is evaluated.
The real issue this solves is consistency. When pricing logic lives in application code, it drifts, which means:
It usually looks fine at first, then starts breaking once usage spreads across services.
Pulling pricing into a single runtime keeps those decisions in line and makes it possible to simulate against the same logic that runs in production.
This is also the point where pricing starts to depend on infrastructure rather than configuration alone.
Define the full pricing model in configuration before writing integration code. This forces you to make decisions about how the system should behave before it exists in production, instead of discovering them later under load.
At minimum, define:
This is where edge cases usually surface. Questions like what happens when credits are partially consumed, how limits reset, or how overlapping entitlements resolve tend to stay hidden until real usage hits the system.
Treat this as a schema definition problem. If two engineers read the same plan configuration and arrive at different outcomes, the system will behave inconsistently once those rules are evaluated at runtime.
Synthetic tests miss the problems that actually matter, like burst traffic, retries, and long-running sessions. These stress the system in ways that isolated requests don't, and the failures only appear once state is shared across concurrent requests.
Start by replaying a slice of production logs against the new configuration. This shows you how the model behaves under realistic conditions without exposing users to risk, and tells you three things single-request tests can't:
Before launch, the question is whether enforcement stays consistent when requests overlap and state changes in real time.
Pricing models regularly behave differently once they’re exposed to real usage, especially when limits, credits, and concurrency interact. Testing multiple configurations against the same event stream makes those differences visible before they show up in production.
Run parallel models against the same usage data:
The goal is to evaluate how each model behaves under the same conditions, where differences in credit depletion, limit triggers, and enforcement under load become easier to see because the input remains consistent.
Assumptions fall apart here. A model that seems reasonable on its own can behave very differently when it runs continuously against real usage patterns.
Pricing systems can break when the boundary between configuration and code is unclear. What starts as a simple change to a plan or limit quickly turns into a deploy because the logic that enforces it is tied to the application.
The distinction shows up in how changes propagate through the system:
When those concerns overlap, small pricing updates begin to depend on application releases, and unrelated parts of the system get pulled into the same change. Over time, that makes pricing harder to test and makes inconsistencies more likely.
Changes that affect how usage is measured or enforced usually belong in code. Changes that affect how usage is packaged or limited should be evaluated through configuration and applied at runtime.
Teams with stricter infrastructure requirements often keep enforcement local through a Sidecar running inside their own VPC, which helps checks continue resolving even during upstream network instability.
What matters is whether enforcement holds when requests overlap and state changes in real time. If limits cannot be applied consistently under those conditions, the model will drift once it reaches production.
Miro needed to launch a credit-based pricing model for its AI collaboration platform, Innovation Workspace. It needed consumption-based entitlements, seat-calculated credit allocations, monthly resets, and real-time enforcement across its existing stack. The team configured it with Stigg rather than building from scratch, and shipped in under 6 weeks.
The difference shows up once the system is under real load. Entitlement resolution, credit burn behavior, and limit enforcement can be tested ahead of launch using the same logic that runs in production, so inconsistencies show up before users hit them.
The parts of pricing that break in production are usually the ones that depend on shared state, timing, and real usage patterns. Testing before launch needs to focus on how those behaviors hold when the system is under load.
That typically means validating how entitlements resolve, how credits deplete, how limits behave at boundaries, and how quickly changes propagate through the system.
Entitlement logic breaks when multiple rules overlap and the system has to decide which one applies.
A common scenario is a user on a grandfathered plan who upgrades mid-cycle while a promotional credit or trial is still active. The system has to resolve:
The resolution logic needs to produce a single, consistent answer across all of these inputs. If two services evaluate entitlements differently, the system becomes unpredictable.
A clear starting point is to build a matrix of overlapping states and validate each output against expected results, with every combination defined as a deterministic case that can be clearly verified.
Credit systems often look correct until they are exposed to real usage. The issue is how consumption behaves over time.
For example, a user may trigger a sequence of requests that mixes small prompts, retries, and long-running tasks. That pattern stresses the burn logic in ways a simple test does not.
You need to verify that:
Replay real usage data through the credit ledger and watch how balances change over time. This shows you whether the burn order holds under realistic conditions.
Key takeaway: Credit systems fail in sequence rather than isolation, so test them as a stream of events rather than single transactions.
Tier limits create the most visible failures because they directly affect user experience.
The question is what happens at the exact moment a user hits a limit. The system needs to make a consistent decision across all requests:
That decision becomes harder when multiple sessions hit the limit at the same time. Without coordination, one request may pass while another is blocked, even though both should behave the same.
To test this, simulate concurrent requests that approach and cross the same boundary. Observe whether enforcement is consistent and whether users see predictable behavior.
Plan changes introduce timing challenges that are easy to overlook. When a user upgrades, the expectation is that access updates immediately. Any delay between the billing event and entitlement enforcement creates a window where the system behaves incorrectly.
This is where many systems fail, especially when caching is involved. The entitlement state may update in one place but remain stale in another.
To simulate this, trigger plan changes while sending active requests and measure:
This is about timing. A system that resolves entitlements correctly but too slowly will still create user-facing issues.
Pricing systems that behave correctly in sequence can still fail under load. Concurrency, cache timing, fallback behavior, and entitlement conflicts are where those failures usually show up.
When multiple requests interact with shared state at the same time, Step 3 results do not guarantee Step 6 results.
Concurrency is usually where limits break first. Two requests can pass the same check before the balance updates, which leads to over-consumption even though each request looked valid in isolation.
Cache issues show up as timing gaps. This is where a plan change updates the source of truth, but cached data continues to serve the previous state. This creates a window where enforcement does not match the current plan.
Fallback behavior is a reliability decision. Whether the system allows or blocks requests during an outage needs to be explicit and tested before production. A system with no defined fallback policy behaves unpredictably across services the first time it hits an upstream degradation.
Mid-cycle plan changes create the most complex cases. A user upgrading while a promotional grant is active forces the system to resolve multiple sources of truth at once, and any inconsistency in how those rules are applied leads to unpredictable behavior. That includes:
The goal is a single, consistent result across services. Behavior becomes unpredictable when resolution differs between components.
Pricing simulation can validate how a model behaves, but it depends on the system underneath to measure, enforce, and maintain state correctly. Engineering work is needed where the system needs to change.
Structural changes affect how usage flows through the system. Moving from seat-based to credit-based pricing introduces new units, new aggregation logic, and new failure modes.
Credits need to be debited atomically, tracked across sessions, and reconciled over time. That changes how events are emitted, processed, and stored.
This shows up in places like:
If these pieces are not aligned, simulation can produce correct outputs against a system that cannot enforce them.
Every pricing model depends on how usage is measured, and that definition rarely holds once real traffic patterns are involved.
Counting requests works until retries, batching, or streaming responses enter the system. At that point, the unit of measurement becomes ambiguous. Should a retry count as a new event? Should a streamed response count once or per chunk?
These decisions define what the system is actually measuring. A useful way to think about it is that metering defines the contract between your product and your pricing model. If that contract is unclear or inconsistent, simulation results will not match production behavior.
Pricing simulation falls short when the system cannot produce the signals the model depends on.
A common case is modeling session-level behavior while the system only emits request-level events. The model looks correct, but the data does not reflect how usage actually happens.
This tends to surface late, after the model appears validated at the configuration level.
The practical takeaway is to define how usage is measured and emitted first, then validate pricing behavior on top of it.
A pricing simulation feedback loop works when you can trace how every request is evaluated, enforced, and recorded over time. That means tying usage events to entitlement decisions, capturing the right signals, and validating behavior under real concurrency.
This allows you to understand why limits trigger and verify that the system holds under production conditions.
A simulation becomes useful when every usage event can be traced back to the decision that allowed it. Each entitlement check needs to capture the state at that moment.
At a minimum, record:
Without this, you can see what happened, but not why the system behaved that way.
The goal is to capture the metrics that explain enforcement behavior.
Focus on signals tied directly to system performance:
These signals let you move from “did it work” to “why did it behave this way,” which is what you need to trust simulation results.
Synthetic data tends to smooth out the patterns that cause issues in production. Real usage, on the other hand, is uneven, bursty, and accumulates over time.
Replaying production traffic into staging shows how the system behaves across sessions and over longer sequences of events. This is where limits trigger earlier than expected, credits deplete out of order, or enforcement lags behind usage.
Most issues appear once requests overlap. A model that behaves correctly under low traffic can fail when multiple sessions interact with shared state.
Test at realistic concurrency levels:
Race conditions and state inconsistencies only become visible at this level.
Pricing simulation results often look correct under controlled inputs but fail once real usage introduces concurrency and variability. Treat results as valid only when tested under conditions that match how the system will actually be used.
Pricing simulation only works when it runs on the same runtime layer that will enforce pricing in production, under real concurrency, shared state, and limits.
Stigg is the usage runtime for AI products that need to simulate and enforce entitlements, credits, and limits in real time while Stripe, Zuora, or others handle billing. It provides:
Teams that pair simulation with this usage runtime keep staging and production behavior aligned and turn pricing changes into configuration work instead of engineering projects. See how Stigg approaches pricing simulation and enforcement for AI products at scale.
Pricing simulation is accurate when it uses real usage data and reflects production conditions like concurrency and retries. Simulation results become unreliable when based on synthetic data or incomplete metering signals.
The biggest risks when testing pricing models are missing edge cases, incorrect usage measurement, and testing under unrealistic load. These issues often cause pricing to behave differently in production than in simulation.
No, pricing simulation using real production data reduces risk significantly, but does not replace real-world testing. Simulation cannot replicate every timing condition or edge-case sequence that only emerges at scale. Treat simulation as the primary validation layer and early production traffic as the final one.
You simulate concurrency in pricing models by running parallel requests against shared state, such as credit balances or usage limits. This helps expose race conditions and inconsistencies that only appear under load.
You should run pricing simulation after defining metering and entitlement logic but before launching pricing changes. Running it too early produces misleading results, while running it too late increases the risk of production issues.