Getting started

Read this before you write any code. Most of the surprises in a wallet integration come from the direction the calls travel, not from what they carry.

How the integration is shaped#

This is not an API you call to place bets. It is the reverse: you expose one HTTPS endpoint, and we post commands to it as rounds play out. Your platform stays the wallet of record and answers each command from your own ledger. You call us for two things only — launching a game and fetching the catalogue.

How calls flow between an operator platform and casinoapi.tech Two boxes side by side. On the left, the operator platform, holding the player ledger. On the right, casinoapi.tech. Three arrows run right to left, labelled getBalance, writeBet and rollback: these are the wallet commands posted to the callback URL the operator exposes. Two arrows run left to right, labelled POST /games/openGame and GET getUserGames: these are the two calls the operator makes. Your platform wallet of record one callback URL per currency casinoapi.tech games and round logic posts the wallet commands getBalance writeBet rollback POST /games/openGame GET getUserGames How calls flow between an operator platform and casinoapi.tech Two boxes side by side. On the left, the operator platform, holding the player ledger. On the right, casinoapi.tech. Three arrows run right to left, labelled getBalance, writeBet and rollback: these are the wallet commands posted to the callback URL the operator exposes. Two arrows run left to right, labelled POST /games/openGame and GET getUserGames: these are the two calls the operator makes. casinoapi.tech posts the three wallet commands getBalance writeBet rollback Your platform wallet of record one callback URL per currency POST /games/openGame GET getUserGames casinoapi.tech launches games, returns the catalogue

Almost every surprise in a first integration comes from that direction of travel rather than from the contents of any single message.

What you build#

A callback endpoint#

One HTTPS URL, registered per currency in the admin panel. It has to be reachable from our addresses and it has to answer quickly: a balance lookup sits directly in the path of a game load, so a slow endpoint is a slow game rather than a slow background job.

Signature verification#

Every request carries an X-Signature header — a hex HMAC-SHA256 over the raw bytes of the request body. Verify it before you parse.

Sign the bytes that arrived, not the object you parsed

If your framework hands you a decoded body, capture the raw bytes first. Re-serialising JSON changes key order, spacing and number formatting, so the digest no longer matches and every request looks forged. This is the single most common way a first integration fails.

Three command handlers#

  • getBalance — answer with the player’s balance from your ledger.
  • writeBet — apply a bet and a win together; they arrive in the same call.
  • rollback — undo a transaction, once.

Field shapes, idempotency rules and status codes are in the wallet callback reference.

Game launch#

POST/games/openGame

Returns a URL. Put it in front of the player — an iframe or a full-page redirect both work — and the round begins. The commands above start arriving at your callback from that moment.

What we configure#

Three things, all in the admin panel: the callback URL for each currency, the IP allowlist, and the stage currency list. Getting those right is the whole of the setup.

Everything a reader might expect to find as an endpoint and does not — coin packages, bonus rules, redemption thresholds, which states a product is available in — is back-office configuration. Some of it you change yourself; some of it is a request to us. None of it is called over the wire.

A working sequence, end to end#

One round, from catalogue to settlement, with the actor named at every step.

  1. Your platform calls GET getUserGames for a player and a currency, and renders what comes back.
  2. Your platform calls POST /games/openGame for the game the player picked, and puts the returned URL in front of them.
  3. The player spins.
  4. We post getBalance to your callback URL.
  5. Your platform answers from its own ledger. If that answer does not arrive, the round does not start — which is the correct outcome, and much better than a round settled against a guess.
  6. We post writeBet, carrying the bet and the win for that round together.
  7. Your platform applies both, then answers with the resulting balance — the figure after the operation, not before it.
  8. We post rollback for that transaction if the round could not be completed. Your platform restores it once and answers with the balance.

Before you go to production#

A checklist, not a discussion. Each line is something that has broken a real integration.

  • Signature verified against the raw request bytes, before any parsing.
  • A repeated transactionId returns 200 with the current balance and applies nothing.
  • A rollback for a transaction you never received returns success, not an error.
  • bet and win parsed whether they arrive as numbers or as strings.
  • A failed getBalance prevents the round instead of returning a default or a cached figure.
  • Stage credentials swapped for production credentials, everywhere they are held.
  • Production addresses on the allowlist, and the production callback URL registered for every currency you are launching with.

Credentials and environments are covered in sandbox access; the model behind all of this is set out in seamless wallet integration.

Last reviewed . Something wrong or missing on this page? Tell us.