Skip to content
Skip the menu

Getting started

Introduction

What GameCoin is, how its pieces fit together, and which of the three ways to integrate it suits your game.

View as Markdown

On this page

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. Payments there are simulated: no money moves. Real payments are not available yet.

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
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 is in French for now; this documentation names its 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.