Skip to content
GameCoinDocs
Dashboard

Apilow GameCoin documentation

Build the bank of your game

Virtual currency, inventory and orders for web and mobile games. A ledger you can trust, packs sold in euros, and an API you call from the browser, your server, or both.

Your first call

Grant a player 100 gems. The player is ext:user-42: your own id for them, which GameCoin creates on first use. Write requests carry an Idempotency-Key, so a retry never credits twice.

  • Test keys are created with your game: payments are simulated, nothing moves.
  • Every change is an immutable ledger entry; balances stay exact.
  • The key picks the game and the environment: your code never changes to go live.

Follow the quickstart

LangageLanguage
curl -X POST "https://gamecoin.apilow.com/api/v1/players/ext%3Auser-42/wallet/grant" \
  -H "Authorization: Bearer $GAMECOIN_SECRET_KEY" \
  -H "Idempotency-Key: welcome-user-42" \
  -H "Content-Type: application/json" \
  -d '{"currency": "gems", "amount": 100, "reason": "welcome_gift"}'

Three ways to integrate

What changes between them is who may credit. A browser can read, spend and pay; only your server, or a paid order, can add to a balance.

What do you want to do?

SDKs for every stack

Compare the SDKs

The server SDKs are a pre-release and are not on the package registries yet. Each page gives the install command that will work once the package exists.

The API at a glance

45operations
2APIs: server and client
3credentials
1OpenAPI 3.1 document

About GameCoin

What GameCoin is

GameCoin is the bank of your game. It keeps the virtual currency, the inventory and the orders of a web or mobile game, so you do not build a ledger, a payment flow or VAT handling yourself.

Every change to a balance is an immutable entry in a ledger, so balances stay exact when a request is retried, sent twice, or refunded. You sell currency packs for euros through a hosted payment page, and players spend the currency on items and on anything else your game offers. You call GameCoin from the browser, from your server, or both, and a browser can never add coins to a balance, except the free coins of a gift code that you issued.

Note

The test environment is open to every studio, and payments there are simulated: no money moves. Verified studios sell for real in the live environment. See Going live.

Studio ─ Game ─ Catalog                        what you sell, defined once
                ├─ Currencies   gems (paid), gold (free)
                ├─ Items        potion (consumable), fire-sword (durable)
                └─ Packs        "500 gems + 50 free" for 4.99 €

       Players ─ Wallet         one balance per currency: paid + bonus
               ├ Inventory      the items a player owns
               └ Orders         the packs a player bought, in euros

You describe the catalog once. Your players then fill it with balances, items and orders. Each change to a balance is written in the ledger and never altered. Read Core concepts for the words used everywhere, one by one.

Three ways to integrate

Where your code runsKeyGood for
Browser onlyIn the browser, with the SDKPublishable keyA game with no server: itch.io, a game jam, a no-code engine
Server and browserYour server holds the rules; the browser shows and spendsSecret key on the server, publishable key and a token in the browserA game with accounts, rewards and rules to enforce
Server onlyYour server calls the API; no GameCoin code in the gameSecret keyA backend that sells and credits, with its own client

What changes between them is who may credit. A browser can read, spend, buy items and pay for packs, and it can never add to a balance by itself. Only your server, with the secret key, or a paid order can; the one exception is a gift code you issued, which adds free coins once per player. Security model explains why.

Choose your path

You want to…Start here
Have something that runs, in one fileOne page: a working game
Try everything in ten minutesQuickstart
Sell currency in a game with no serverA game without a backend
Reward players and run the rules from your serverA game with a backend
Sell packs for euros, and understand VAT and ordersSelling packs
Understand balances, refunds and debtsWallets and ledger
Give players a ready-made shop pageThe hosted shop
Show that shop inside your web gameShop widget
Look up every call of the browser SDKBrowser SDK
Call the API from your own languageServer SDKs and API reference

What you need

  1. A GameCoin account, and a game in the dashboard. The dashboard speaks French, English and Dutch; this documentation names the French labels where you need them.
  2. Your keys: the publishable key gc_pk_test_… for the browser, and the secret key gc_sk_test_… for your server. Test keys are created with the game.
  3. A catalog: at least one currency and one pack. Quickstart lists the steps.

How this documentation is organised

SectionWhat it holds
Getting startedThis page, the quickstart and the core concepts
ConceptsOne page per subject, with the exact rules: the ledger, players, keys, idempotency, security, errors, rate limits
GuidesComplete walkthroughs you can run
Browser SDKThe reference of gamecoin.js and of the shop widget
Server SDKsThe SDKs for Node.js, Python, PHP, Go and C#
API referenceEvery route, field and error

For AI assistants

Every page is also served as plain Markdown: add .md to its address (https://gamecoin.apilow.com/docs/quickstart.md). /llms.txt lists the pages with a one-line description, and /llms-full.txt holds the whole documentation in one file. The API is also described as an OpenAPI 3.1 document at /api/v1/openapi.json.