Game systems

In-game store: storefronts, offers and prices

How the ready-made iDos Games store works - storefronts with rotating offers, prices in game currency or real money, free gifts and purchase limits - and how to set it up in the dashboard without code.

Updated: Русский

The store is a ready-made system: the shop screen in your game plus the server logic of purchases. You set up storefronts and offers in the dashboard, and on every purchase the server checks the price, limits and rotation by itself. A purchase cannot be faked from the game, and the store needs no server of your own.

What the player sees

  • Storefronts as tabs. The first section of a storefront is a carousel, the rest are grids of cards.
  • A free daily gift that shines until it is claimed.
  • Timers on the cards: "refreshes in", "opens in", "sold out".
  • A purchase confirmation popup (a bottom sheet on phones).
  • The "You got" animation: rewards fly to the balance counters.
  • A badge on the store tab when a free offer is waiting.
Shop
12 450
320
Daily1
Currency
Packs
Daily deals Refreshes in 15:40:12
Daily gift
FREE
Hero sword
1 200
Gear chest
90
Sold out
500 coins
$0.99
Best value1 200 coins
$1.99
x2 first buy
Storefronts are tabs; the badge counts free offers waiting.
Rotation timer: the server swaps the offers of the slot when it runs out.
A free daily gift shines until it is claimed.
Sold out: the limit for this window is spent.
Ribbons and the first-purchase bonus come from the offer settings.
Example. The store screen as a player sees it, in the default look. The look is changed in src/ui.config.ts.

How the store is built

The store is a tree: storefront → sections → slots → offer.

  • Offer - what is sold: price, rewards, limits, ribbons ("best value", "x2"). Offers live in one catalogue.
  • Slot - a place on the storefront shelf. An offer can be bought only through a slot: an offer that stands in no slot is not sold at all.
  • Rotation: a slot can show an offer from a pool and change it on a schedule, like a daily shop. The server computes the rotation, so a player sees the same store on every device.
Storefront"Daily shop"
Section"Daily deals"
Slots
Slot 1: always the daily gift
Slot 2: one of 6 offers, new every 24 h
Slot 3: empty until the window opens
Offers catalogueprice, rewards, limits
An offer in no slot is not sold
Example. How a storefront is built in the dashboard: an offer is sold only through a slot.

Prices

What the player paysHow it works
Game currency, itemsTaken from the player's balance
Real moneyA purchase in the app store; the server checks the receipt
Watching an adThe player spends an ad view they earned (builds with ads)
NothingA free offer; a limit is required, or the server will not sell it

You can show a struck-through "old" price, and the server computes the discount percent. One offer can have several price options, for example coins or gems.

Purchase limits

  • Lifetime - for example, a starter pack once.
  • Per day - resets at midnight UTC.
  • Cooldown - the next purchase after a set time.
  • Per rotation window - the slot's limit while this offer stands on the shelf.

The server computes the "first purchase" and "sold out" badges and the timers for each player.

Step 01Add the store to your project

The idle RPG template already has a store with a sample storefront. In any other project the AI coder adds it: write "Add a shop" in the chat. It installs the ready system instead of writing a store from scratch. The store tab appears for players once there is something to sell.

Step 02Set up offers and a storefront

Open the dashboard, pick your project and go to Live Operations → v2 → Store.

  • On the Offers tab create an offer: name, price, what the player gets and a limit.
  • On the Storefronts tab create a storefront, add a section and slots to it and put offers into the slots.
  • Presets are shared settings you can apply to many offers at once.

The dashboard warns about offers with no slot and free offers with no limit. The AI button on the page opens an assistant: describe what to sell ("a 500 coin pack for $0.99 and a free daily chest"), it proposes changes, and you review them and press Save.

Step 03Test and release

Check the store in the test version of your app. Settings go to the live app as a separate action, so a code release never overwrites them. More in publishing and links.

For developers

The store works through client.store in @idosgames/core. Draw the screen from getStorefront(): the storefront already resolved for this player (rotation, limits, timers). getDefinitions() is only the config, the same for everyone.

TypeScript
const res = await client.store.getStorefront()
if (!res.ok) return showError(res.error)

for (const store of res.data.Stores ?? [])
  for (const section of store.Sections ?? [])
    for (const slot of section.Slots ?? []) {
      // An empty slot arrives with Offer === null: draw an empty frame so the shelf does not jump.
      if (!slot.Offer) continue
      drawCard(slot.Offer, slot.RefreshesAtUtc)
    }

const buy = await client.store.purchase(offer.OfferID, 1, {
  selectedOptionID: option.OptionID,
  slot: { storeID: store.StoreID, sectionID: section.SectionID, slotID: slot.SlotID },
})
  • If a purchase returns OFFER_NOT_IN_ROTATION, the storefront has changed: reload it without showing an error.
  • Disable the "Buy" button while the request is in flight: every purchase call is a separate purchase.
  • Count timers down from ServerTimeUtc in the response, not from the device clock.
  • null in a remaining limit means "no limit", 0 means "sold out".

Every field is described in the store-system skill, served by the SDK MCP server.

Frequently asked questions

Why is an offer in the catalogue but cannot be bought?

An offer is bought only through a storefront slot. If it stands in no slot, it cannot be bought at all. The dashboard lists such offers under a separate "Not on any shelf" warning.

Can I make a free daily gift?

Yes. An offer with no price is a normal free offer, but it must have a limit, for example once a day. The server refuses to sell a free offer with no limit.

Do I need to verify purchases on my own server?

No. The iDos Games server checks the price, limits and rotation on every purchase. The game only shows the storefront and asks to buy.

Do premium discounts apply?

Yes. The server applies premium tier discounts and bonuses by itself. The game reads what was actually charged and granted from the purchase response.

See also

Make your own game

Describe the idea in a sentence - the AI coder builds it, and it goes live at its own link.