> ## Documentation Index
> Fetch the complete documentation index at: https://docs.turntable.games/llms.txt
> Use this file to discover all available pages before exploring further.

# Economy

> Coins, items, loot boxes, and player-approved purchases.

Turntable has one platform-wide currency (**coins**) and per-game **items**.
Players buy coins from Turntable; your game sells items priced in coins.
The design principle underneath everything:

> **Games request purchases. Players approve them. The platform settles
> them.** Your game can never take coins on its own.

## The purchase flow

1. Your game calls `Turntable.shop.purchase(itemId)`.
2. The platform creates a **pending purchase intent** and notifies the
   Turntable app.
3. The app shows a **native confirmation sheet** — item name, price, the
   player's balance, and (for loot boxes) the full drop table. Your game
   cannot draw over, dismiss, or fake this sheet; it lives outside the
   WebView entirely.
4. The player approves or declines. The promise your game is awaiting
   resolves with the outcome:

```js theme={null}
Turntable.shop.purchase('golden-skin').then(function (result) {
  if (result.status === 'approved') {
    equipSkin(result.granted);          // what was granted (loot boxes: the rolled item)
    updateCoinLabel(result.newBalance); // the player's balance after settling
  } else if (result.status === 'declined') {
    // player said no — carry on, don't nag
  }
});
```

Intents expire if unanswered (\~2 minutes). Treat `expired` like `declined`.

## Items and loot boxes

Creators define items per game (name, description, price, and optionally a
loot table). Two rules are enforced by the platform:

* **Odds are public.** Loot-box drop rates are returned by
  `shop.listItems()`, shown on the native confirmation sheet, and available
  through the public API. There is no hidden-odds mode.
* **Grants are server-side.** Loot-box rolls happen on the platform, not in
  your game's code, and land in the player's inventory atomically with the
  charge.

## Who can buy

Purchases require a signed-in account — guests accrue coins/progress but
can't spend until they sign up (see the platform's account-gating model).
Your game doesn't need to check this; a guest's purchase attempt resolves
`declined` after the platform prompts them to sign in.
