Pre-Purchased Stock vs On-Demand API Fulfilment: Which Wins
This is the first architectural decision any digital-goods store makes, and it shapes your working-capital structure for years. Either you buy codes ahead and hold them, or you create an order at the supplier at the moment of sale. This article compares both models across the six factors that actually move money, then gives you a decision framework.
Both models in one paragraph
Pre-purchase (stock-first). You buy a batch of codes, store them in your own database, and sell from it. The goods become your asset at purchase time. Delivery is instant because the code is already sitting with you.
On-demand (API-first). You hold a deposit with your supplier and create the order at the moment of sale: POST /orders → wait → code. You own the goods for a fraction of a second. The inventory sits with the supplier, and so does the holding risk.
Both are legitimate. The mistake is almost always the same one: comparing them on purchase price while forgetting cost of capital and write-offs.
Factor 1: working capital
This is the main fault line. Under pre-purchase, your capital lives in three places at once: the supplier deposit, unsold stock, and money in transit from your sales channels. Turnover decides everything — a batch that clears in three days and a batch that clears in sixty are fundamentally different businesses even at identical per-unit margin.
Under the API model you hold only the deposit needed to cover near-term order flow. The same revenue is served by less capital, and the freed cash can go into traffic, catalogue expansion or new channels. For a growing store that usually matters more than one or two points of purchase price.
Practical test: compute the average value sitting in unsold codes and compare it to a month of profit. If your stock is worth more than a month of profit, you are financing a warehouse, not a business.
Factor 2: stockout risk
The two models fail differently, and you must design for that up front.
- Pre-purchase protects you at the moment of sale — the code already exists. But it creates the mirror risk: you bought the wrong denomination or the wrong region and now hold dead inventory.
- API-first depends on the supplier having stock right now. A shortage on a popular SKU during peak hour is a real scenario.
The correct answer to the second risk is not a buffer but routing: multiple sources per SKU, automatic fallback to an alternative region or denomination, and an honest "temporarily unavailable" state on the storefront instead of an error. We cover the mechanics in multi-source fulfilment routing and in supplier stockout recovery.
Factor 3: expiry and code revocation
This is where pre-purchase loses hardest, and it is the factor most often underestimated.
A code sitting in your warehouse for three months is a code that can spoil the entire time: a promotional window closes, the issuer revokes a batch, an activation region disappears after a platform policy change. A code bought on demand spends milliseconds with you and reaches the buyer fresh.
The decisive difference is liability. If a code you bought three months ago gets revoked, your claim against the supplier is almost always harder than one on a code delivered yesterday — logs, claim windows and dispute practice all work against aged stock. How to prepare is covered in handling code revocation and region locks.
Factor 4: price-move risk
A two-sided factor, and that is precisely the point.
Pre-purchase locks in your cost. If prices rise, you win. If they fall — and on digital goods they fall regularly after seasonal sales, regional rebalancing or FX moves — you are holding stock above the current market and must either sell at a loss or wait. The API model always trades at today's price: you capture no upside, but you never sit in over-valued inventory.
For a thin-margin reseller the second usually matters more than the first. Speculating on purchase price is a separate business with its own capital requirements, and few people want to be in it by accident.
Factor 5: delivery latency
The one factor where pre-purchase wins outright. A code from your own database is served instantly. An API order runs through creation, balance debit, processing and delivery — usually seconds, but never zero, and potentially longer at peak.
This matters where a buyer is staring at a screen waiting for a code: impulse purchases, mobile traffic, and channels with strict delivery-time metrics. The engineering answer is normally not "pre-buy everything" but a correct waiting UX plus a thin buffer on your hottest few SKUs. The full lifecycle is broken down in order flow explained.
Factor 6: reconciliation complexity
The counter-intuitive one: the API model is simpler to account for, even though it looks more technical.
Under pre-purchase you run a parallel inventory ledger: what was bought, reserved, delivered, spoiled, and what failed to match at stocktake. You inherit the classic three-way discrepancies between inventory, sales and bank.
Under the API model every sale maps to exactly one supplier order with its own ID and status. Reconciliation collapses to matching three lists: your sales, supplier orders, deposit movements. That is a daily automated job, not a quarterly stocktake.
Comparison table
| Factor | Pre-purchased stock | On-demand API fulfilment |
|---|---|---|
| Working capital | Frozen in stock and deposit | Operating deposit only |
| Shortage at moment of sale | Low (code already held) | Real, mitigated by routing |
| Dead-inventory risk | High | None |
| Expiry and revocation | Yours, compounds over time | Minimal exposure window |
| Price falls | You hold over-valued stock | Always at current price |
| Price rises | You gain | No gain |
| Delivery latency | Instant | Seconds, supplier-dependent |
| Supplier uptime dependence | At purchase time only | At every sale |
| Reconciliation | Inventory ledger + discrepancies | One order per sale |
| Barrier to entry | Capital for a batch | Minimum deposit |
Decision framework
Pull on demand via API when:
- your catalogue is broad and tail demand is unpredictable;
- the product is subject to revocation, region restriction or expiry;
- you are growing and capital belongs in traffic, not in a warehouse;
- you sell across several regions and cannot hold stock for each.
Pre-purchase when:
- the SKU is reliably scarce and demand is predictable;
- the tier gain genuinely exceeds cost of capital plus write-offs — calculate it, do not eyeball it;
- you run a channel with hard delivery-time requirements and enough volume that the buffer turns over in days, not months.
By product type, the rule of thumb: major-issuer gift cards and top-ups almost always on demand, since the spread is too thin to justify freezing cash. Game keys on demand by default, with pre-purchase reserved for a specific campaign whose economics you have modelled. Subscriptions and software licences on demand, because activation policies shift. Scarce limited-availability items are the one category where a buffer is regularly justified.
The hybrid that usually wins
In practice mature stores converge on the same shape: a thin buffer on the 5–15 best-selling positions plus API coverage for everything else. The buffer absorbs peaks and delivers instantly; the API covers the tail with no capital. The consumption rule must be strict and deterministic — local stock first, automatic API fallback on depletion, result written to one order table. How to build that pipeline is covered in automating digital code delivery and launching a store on an API.
Where to source inventory
Three things matter for the API model: catalogue breadth so your tail is not stitched from five integrations, genuine availability across multi-region SKUs, and predictable automatic delivery. FoxReload is built for exactly that — 900+ SKUs across keys, gift cards, top-ups, eSIM and software licences behind a single REST API with auto-delivery, so the entire tail is served without buying stock and you hold a buffer only where you have proven it pays for itself.
Before you build the integration, read common API integration mistakes — it is cheaper than discovering them in your own production.
