Credit Wallet Data Models for AI SaaS Products
Treat credit wallets as ledger systems, not balance columns, to avoid rebuilding billing at scale.

A credit wallet in an AI SaaS product looks, at first glance, like a number that goes down when a customer uses the product. That appearance is the problem: the companies that build it as a balance column rather than a full ledger object end up rebuilding their billing system at the exact moment they can least afford to.
The credit wallet problem
Solvimon's 2026 analysis of AI billing lays out the failure mode in blunt terms: teams treat credits like a payment method, a prepaid balance that gets deducted on use, and call it done. It works, for a while. Then the company crosses a serious ARR threshold and discovers that what it actually built was a column in Postgres, a cron job, and a finance team manually reconciling spreadsheets every month. That discovery rarely happens gradually. Three problems tend to surface at once: customers start asking about rollover rules, product wants to pool credits across a team or across a fleet of agents, and sales has promised a tiered exchange rate to a big account, none of which a single balance field can express. A number that goes up and down cannot answer questions about history, allocation, or timing, because it was never designed to hold that information.
The reason this keeps happening is that credits are not a feature of the product. They sit at the point where three separate systems meet: the pricing logic that decides how much a credit costs, the metering layer that decides what consumption a credit represents, and the financial ledger that decides what happens, for revenue recognition purposes, to a credit nobody spends. A balance column can only ever represent the output of all three systems at a single moment. It cannot represent the systems themselves, so when any one of them changes, the column has to be patched by hand, which is how a credit system turns into a cron job and a spreadsheet.
Ibbaka's 2026 predictions treat this as a structural shift rather than a one-off implementation mistake: credit wallets are moving from experiment to standard infrastructure, and billing systems need to treat the wallet as a first-class object rather than something bolted onto an existing subscription table. The rest of this piece works through what that actually requires, starting with why credits are the right unit to build around.
Credit-Based Pricing for AI Inference Workloads
Credits earn their place as the default unit for AI inference because of who ends up holding the risk when usage is unpredictable. Solvimon's 2026 framework breaks the options into categories: per-token pricing passes cost risk entirely to the customer, since spend tracks usage exactly; credit-based pricing splits that risk, with the vendor setting the exchange rate and the buyer prepaying; and hybrid pricing splits it again, between a fixed base fee and a variable usage component. Pure token billing has the virtue of accuracy, but accuracy is not the same as comprehensibility, and most buyers find a line-item invoice billed in token counts hard to reason about. A single runaway automation, left to run at per-token rates, can generate an invoice large enough to trigger a dispute rather than a payment, which is bill shock wearing the costume of revenue. Reports of a single developer accumulating thousands of dollars in charges within a month, on an annually-billed plan with no usage ceiling, point to the same root issue: uncapped usage under a metering system that never defines a limit is a decision made at the architecture level, not a gap in customer education.
Credits solve this by giving both sides a fixed, prepaid unit to reason about, while leaving room to evolve the pricing model later without starting over. Flexprice's 2025 guide describes this as Ibbaka's "bridge strategy": start with credits, then layer value-based pricing on top as outcome data builds up. Credits work as a bridge because they let a company bundle several different AI capabilities into one internal currency and test pricing changes without destabilizing the product's entire revenue model. That bridge has already been built by companies operating at very different scales. OpenAI, HubSpot, Salesforce, Microsoft, and Clay all use credits to connect raw consumption to higher-level outcomes.
That range of adopters also explains why the market has settled on hybrid pricing rather than pure pay-as-you-go. Digital Applied's research finds that hybrid models, usage bundled within or layered onto a base fee, now dominate over pure usage-based billing, and that gap reflects a genuine tension between pricing that tracks value and pricing that a finance team can forecast. Ibbaka's 2026 predictions go further, naming credit-based pricing the default pattern for new AI-native products and agents, with users, usage, and value all running through one unified credit model built for both predictability and flexibility. None of that matters, though, unless the system underneath the credit model can actually hold rollover rules, pooled allocations, and tiered rates without falling over, which is a question of data model, not pricing philosophy.
The core objects a credit wallet data model must contain

A production-grade credit wallet needs at least five distinct data objects: the wallet itself, a transaction ledger, a grant or allocation record, an expiry schedule, and a real-time balance view. Collapsing any two of these into one object works fine in a demo and breaks the first time usage scales past a handful of test accounts.
The wallet entity owns the account relationship, whether that account is a single user, an organization, or a pool shared across agents, along with the currency denomination the wallet is priced in. Its balance should be a derived value, computed from the ledger, rather than a number stored and mutated directly. Storing the balance as a mutable column is the single most common mistake in early implementations: two concurrent inference requests can both read the same balance, both proceed, and both debit against credit that was only available once, a race condition that an append-only ledger avoids by design and that also makes any later audit of "what happened to this account's credits" close to impossible.
The transaction ledger is where every credit movement, purchase, consumption, refund, expiry, or manual adjustment, gets recorded as an immutable entry carrying a timestamp, an amount, a direction, a reference to whatever triggered it, and metadata identifying the resource that consumed it, down to the model ID, agent ID, or API endpoint. Solvimon's framing of credits sitting at the intersection of pricing logic, metering, and the financial ledger is not an abstraction here: the transaction record is the literal object that connects all three, since it is simultaneously a pricing event, a metering event, and a financial event. Every entry needs an idempotency key, because a usage event retried after a network error has to be counted once, not twice, and a ledger without that guarantee will double-bill customers in ways that are difficult to detect and worse to explain.
A grant record is a separate thing from a ledger entry. A grant is a discrete issuance of credit, with its own amount, issue date, expiry date, source (a purchase, a promotion, a contract entitlement), and sometimes a tag restricting it to a specific type of usage, such as a grant that can only be spent against an image-generation endpoint. Without a grant record sitting apart from the ledger, there is no way to answer which credits expire when, or which set of credits a given rollover rule applies to, because the ledger only records what happened, not what was promised. Whether credits are pooled across a team or scoped to individual seats is also a property that lives at the grant level: a team account can have one wallet while still issuing grants that belong to individual members.
The expiry schedule exists because unused credits are not simply inert. Under ASC 606 and IFRS 15, a credit that expires unused converts from a liability on the balance sheet to recognized revenue, and the expiry schedule is the record a finance team needs to make that conversion correctly. Expiry has to be enforced at the moment of consumption, where the system decides which grant gets drawn down first, whether that's FIFO, LIFO, or nearest-expiry-first, and through a scheduled sweep that converts any grant past its expiry date into a zero-balance entry in the ledger.
The fifth object, the real-time balance view, is the one that has to answer a single question fast: does this account have balance left, right now, before the request runs. Flexprice's 2026 guide states the requirement directly, saying that a platform unable to hold a real-time credit balance forces the product team to build a second system in front of the billing platform just to answer that question. That view has to be precomputed or cached in a store built for fast reads rather than recalculated from the entire ledger on every inference call, or it will not survive the read volume AI products generate. Flexprice points to Segwise as a case in point: the team spent three weeks building this balance-check layer in-house before shipping the same capability on Flexprice in three days, a gap that says something about how much engineering time goes into getting this one object right from scratch.
Exchange rates and multi-dimensional consumption rates
Having the five objects in place only solves half the problem. The rate card is harder: a credit is not a fixed amount of compute, so the logic that decides how many credits a given unit of usage costs varies even within a single vendor's own product line.
Solvimon points to Anthropic as a direct example: the exchange rate changes by model, so a call to Claude Haiku burns fewer credits than an equivalent call to Claude Opus. A vertical AI company selling document-processing credits runs into the same issue from a different angle, since the compute cost behind a single credit can swing wildly depending on how complex the document is. Black Forest Labs, as documented in its S1, uses a fixed credit-to-dollar exchange rate, but FLUX.2 [pro] costs more per megapixel for image editing than for text-to-image generation, so the number of credits a single image debits is a function of output resolution, not a flat per-call charge. ElevenLabs runs a third model entirely: characters map to credits on its Multilingual v2 and v3 models within a monthly tier ceiling, overage is billed per batch of characters rather than per minute, and new self-serve accounts draw from Pay As You Go top-ups, while automatic mid-cycle overage billing is limited to legacy and Enterprise accounts. A billing system handling that account has to track consumption against the tier ceiling continuously and switch to a different rate card the instant that ceiling is crossed.
The only way to support that range of behavior without writing a new schema for every new model or every new vendor relationship is to let a single usage event carry rich metadata, model ID, region, output dimensions, the step type an agent is executing, and let the rate card resolve the correct exchange rate from that metadata. Every ledger entry needs to store not just the number of credits it debited, but which version of the rate card priced it, which is what makes a credit system auditable. Rates change over time, and an invoice issued under last quarter's exchange rate has to remain explainable under the rate card that was live when the usage happened, not the one live today. A system that only records the final debited amount, with no record of which rate card or which metadata produced it, cannot answer a billing dispute or support an accurate revenue recognition entry.
Outcome-based pricing adds a further layer on top of this. Digital Applied reports that Intercom Fin charges a fixed fee per resolved conversation, on top of a monthly base. The billing system therefore has to distinguish a resolved conversation from an escalated one. A credit tied to an outcome needs that classification result sitting as a first-class field on the usage event itself. Handled this way, a single event schema, carrying metadata across tokens, API calls, GPU time, model type, region, and workload class, can serve every one of these pricing dimensions at once. The alternative, a separate schema for every new model or every new pricing wrinkle, means every model the product ships becomes a billing engineering project in its own right. The architectural complexity of folding metering, pricing logic, and the financial ledger into one coherent data model is why most teams end up adopting purpose-built billing infrastructure rather than maintaining a custom credit system indefinitely. Flexprice, for instance, treats the credit wallet as a first-class billing object from the start, rather than asking engineering teams to bolt ledger logic onto a balance column and then reconcile the result by hand every month.
Real-time balance enforcement at inference speeds
None of the objects or rate logic described above matters if the balance check happens at the wrong moment. Enforcing a credit balance before a request executes, rather than after, is a hard requirement at the speed AI inference runs, and it requires a read path that is kept separate from the write path used to commit ledger entries.
The sequencing matters because of what has already happened by the time a post-inference check would run. If the balance check comes after inference, the GPU cost has already been incurred, the customer may already be over their limit, and the vendor is left either absorbing the loss or opening a billing dispute. Solvimon identifies bill shock of this kind as one of the leading drivers of churn on usage-based and hybrid plans. The cost of getting the sequencing wrong is not just a finance problem but a retention problem.
Flexprice's 2026 guide puts the bar in concrete terms: the system has to answer whether an account has balance left before the request runs, and it has to do so in milliseconds. A platform that cannot clear that bar forces the product team to build a second system sitting in front of the billing platform just to make that one check fast enough. Because credits sit at the intersection of consumption tracking, cost-risk distribution, and outcome measurement, a billing system built to support hybrid pricing, a fixed subscription layered with metered credit consumption, gives a team room to move from pure token pricing toward value-based pricing later without rebuilding the data model from scratch. That flexibility is a property of the billing engine itself, not something a product team can patch in at the application layer after the fact. A credit wallet that supports real-time tracking, multi-dimensional exchange rates, and expiry rules all at once needs a metering and billing layer built for millisecond-speed event ingestion and atomic balance updates under concurrent load, the kind of infrastructure built specifically for AI products rather than a subscription billing tool with usage tracking added on afterward. Getting the balance check right at that speed is what separates a credit system that holds up under real production traffic from one that only ever worked in the demo.


