The Billing Logic Behind Credit Promotions in LLM Coding Tools
This article explains how billing models and rate limits determine the real cost of promotional credits in LLM coding tools. It covers virtual credit accounting at retail prices, a layered time-window rate limiting design, and breakage, the unspent balance that prepaid programs rely on. It closes with practical lessons for engineering teams designing compute credit programs with a controlled budget.
Introduction: The Engineering Behind Generous Credits
Recently, many developer-facing LLM coding tools have launched promotions offering credits worth hundreds of dollars. These offers have drawn considerable attention. As an engineer who has long worked on prepaid card and billing systems, my first reaction to a promotion like “a small top-up earns a much larger credit bonus” is not excitement. I check the deduction rules first. In this kind of business, the gap between the credit balance shown to users and the actual cost depends almost entirely on how credits are metered and how usage is throttled.
This article sets aside any specific product and examines three core questions from a general technical perspective: what price is used to record credit consumption, how rate limiting gates are layered, and what role breakage plays. The approach applies to any team designing a compute credit program with a controlled budget.
1. The Virtual Credit Accounting Model: Retail Prices, Not Cost
The first concept to clarify is the credit itself. The several hundred dollars in credit is not real money. It is an internal accounting unit. A typical implementation assigns each model its own monthly usage cap. Each API call is converted to US dollars at the model’s published retail price, quoted per million input and output tokens, and then deducted from the account balance.
One key point is easy to overlook: credits are priced at retail rates, while the provider’s actual procurement cost is often much lower. This parallels the face value printed on a prepaid card. A card may show a value of 500, but the issuer’s fulfillment cost depends on bulk discounts and pre-purchased resources. Common industry practice is to buy inference capacity in bulk and reserve GPU capacity in advance to spread out unit costs. As a result, credits metered at retail prices may cost the provider only 30 to 50 percent of their face value, or even less.
From a system design standpoint, this accounting model is not complicated to implement:
Deduction = input tokens × input price+ cache-hit tokens × cache price+ output tokens × output price
Cache-hit tokens are typically billed at a steep discount, about 20 percent of the input price. This reflects the cost savings from KV cache reuse in inference services, passed through to billing. The billing system needs to guarantee three things: every call has an idempotent deduction record, the price table version matches the deduction logic, and every balance change can be traced.
2. Layered Rate Limiting: The Real Usage Boundary
The second design element, and the more important one, is the rate limit applied on top of the credit. Even with several hundred dollars in the account, users cannot consume credits at any speed. A common industry design uses multiple time-window gates:
- Short window: For example, within a 5-hour window, a user may consume at most 20 percent of the monthly credit.
- Medium window: For example, within a calendar week, a user may consume at most 50 percent of the monthly credit. This window resets at a fixed time, such as 00:00 UTC every Monday.
- Total cap: The overall monthly credit limit.
Together, these three gates strictly cap what a user can use at any point in time. Take a $500 monthly credit as an example. The short window allows at most $100 per burst, and the weekly window caps spending at $250. No matter how heavily a user works, weekly consumption cannot exceed half the monthly credit. Reaching that ceiling also requires sustained heavy use across at least three non-overlapping short windows.
Campaign timing and the billing cycle matter too. If a promotion runs from Tuesday to Sunday, it falls entirely within one billing week, so the weekly gate does not reset during the campaign. The maximum usable value of a generous credit is therefore limited by the math of the design from the start. This reflects coordinated work between marketing figures and risk control rules.
There is also a hidden constraint: percentage gates are usually shared across all models. If a user has already used 30 percent of the monthly credit on other models this week, only 20 percent remains for the rest of the week across all models. Shared gates further reduce how much of a headline credit figure can actually be used.
3. Breakage: The Core Financial Logic of Prepaid Products
The third layer is breakage, a concept familiar to anyone in this field. Breakage is the portion of issued value that customers never spend.
Prepaid products such as stored-value cards, points, and promotional credits rest on a basic assumption: issued credit is never fully consumed. Users forget about it, promotions expire, and rate limits prevent full use. All of these leave unused balance, which is breakage. In industry practice, the breakage rate on promotional credits is typically higher than on paid purchases.
Putting the three layers together gives the full picture:
- A $500 balance is recorded at retail prices. Assuming a 50 percent actual cost, the provider’s cost ceiling is about $250.
- The weekly gate limits weekly spending to $250 of recorded value. Because the campaign falls within one week, the maximum actual spend is $250.
- The short window requires sustained heavy load to reach that ceiling, which most users do not sustain. Assume an average spend of $100 of recorded value.
- The corresponding actual cost could be only a few dozen dollars.
As a result, the expected actual cost of a “$500 bonus” promotion may be roughly one-tenth of its face value. This depends less on the inference cost of the underlying model and more on the credit rules themselves.
4. Takeaways for Engineering Teams
The design offers several reusable lessons for teams building similar systems.
First, decouple the accounting unit from actual cost. Recording credits at retail prices makes the balance feel generous to users. Bulk purchasing, cache reuse, and off-peak scheduling can then lower the real cost. The gap between the two is the room for operational flexibility.
Second, make rate limits layered and shared. A single total quota cannot prevent sudden bursts of usage. Short windows smooth out spikes, medium windows control total usage per cycle, and the overall quota serves as the final backstop. Sharing one percentage-based gate across all models prevents users from bypassing limits by switching models.
Third, evaluate campaign windows against billing cycles. When designing a credit promotion, simulate how many times the gates reset during the campaign. Otherwise, the budget may be overspent. Conversely, this is one of the most effective ways to control campaign cost.
Fourth, the billing system needs full audit capability. Every deduction should record the price table version, the token breakdown, and the window usage. This supports dispute resolution and provides the data needed to tune rate limit parameters later.
Conclusion
Generous credit offers are the result of engineering work, not technical miracles. They combine accounting models, layered rate limiting, and breakage assumptions. Understanding this mechanism helps developers assess the real value of different tools. It also gives teams building compute billing and budget control systems a tested design pattern: marketing figures can be large, but cost boundaries must be set precisely by rules.
