Casino API Integration

How a casino API integration works: calls, timeline, pitfalls

What a casino API integration consists of, which calls your platform has to build, how long it takes and where projects usually go wrong.

Updated 5 min read

A casino API integration connects your platform to game content you do not host yourself. The games run on the provider's servers. Your platform keeps the player accounts and the money. The API is the contract between the two: it says how a game is opened, how every bet and win reaches your wallet, and what happens when a call fails halfway.

This guide walks through the whole thing in the order you will build it.

What you are connecting

There are four parties in every game round:

  • The player, in a browser or app.
  • Your platform, which owns the player account, the balance and the lobby.
  • The game provider, whose remote game server (RGS) runs the game logic and the random number generator.
  • An aggregator, optionally, which sits between you and many providers and exposes them through one API.

You can integrate a provider directly or go through an aggregator. The calls look almost the same either way. The difference is how many times you build them and how many contracts you sign. That choice has its own guide: aggregator or direct integration.

The two halves of the API

Every casino game API has two directions, and they are built by different sides.

Calls you make: catalogue and launch

You call the provider or aggregator to:

  1. Fetch the game list. Game IDs, names, providers, categories, supported currencies and devices, thumbnails. You store this and build your lobby from it.
  2. Launch a game. You send the player ID, currency, language, device type and a session token. You get back a URL, which you open in an iframe or a new window.
  3. Launch a demo. The same call without a real player, for play-money mode.

Many APIs also start a session with an authenticate call, in which the game server asks you to confirm the token and return the player and currency. Most platforms also call for free-spin campaigns and for reports, but a casino can go live without them.

Calls you receive: the wallet

Once the game is open, the direction reverses. The game server calls your endpoints every time money should move:

Call What it means What you do
Balance The game wants to show the current balance Return the balance for the session's player
Bet (debit) The player placed a stake Check funds, subtract, return the new balance
Win (credit) The round paid out Add the amount, return the new balance
Rollback (refund) An earlier bet must be undone Reverse that exact transaction, once

This model is called a seamless wallet, because the money never leaves your system. The alternative is a transfer wallet, where funds are moved into the provider's system before play. The trade-offs are covered in seamless wallet or transfer wallet.

The wallet half is where the real work is. Making bet, win and rollback correct under retries and timeouts takes most of the project. The details are in wallet callbacks: bet, win and rollback.

The steps of an integration

  1. Commercial agreement and access. You sign a contract or accept terms and receive staging credentials: an operator ID, an API key or secret, and base URLs.
  2. Catalogue import. Pull the game list and map it into your own game table. Decide now how you will store game IDs, because changing them later breaks favourites, history and reports.
  3. Game launch. Build the launch call, session tokens and the page that holds the game.
  4. Wallet endpoints. Build balance, bet, win and rollback with signature checks and idempotency.
  5. Testing on staging. Run every call, then run the failure cases: duplicate requests, late wins, rollbacks for unknown bets, insufficient funds, expired sessions.
  6. Certification or acceptance. Many providers and aggregators run their own test suite against your endpoints before they enable production. This is separate from regulatory certification: in regulated markets, games and platforms are also tested by an approved lab for that jurisdiction.
  7. Production switch. New credentials, IP allowlists on both sides, a small real-money test, then the lobby goes public.

The pre-launch checks are listed in the go-live checklist.

How long it takes

For a team that already has a working wallet and player system, the first integration is usually measured in weeks, not months. A common shape:

  • A few days for catalogue and launch.
  • One to three weeks for wallet endpoints, edge cases and testing.
  • Extra time for certification queues, which you do not control.

Every further direct provider repeats most of that work, because each provider has its own field names, signature scheme and error codes. An aggregator integration is done once, and new providers are then usually switched on without new wallet code. Provider approval can still take days or weeks, and features such as free spins, jackpots or live lobbies often need extra work.

What slows projects down is rarely the code. It is waiting for credentials, IP allowlisting, unanswered questions on rounding or currencies, and certification slots.

What it costs

There are three kinds of cost: one-off fees to get connected, a share of gross gaming revenue (GGR) charged every month, and your own engineering time. Many agreements also carry a monthly minimum. The ranges and the questions to ask are in what a casino API integration costs.

Where integrations go wrong

The same handful of problems cause most production incidents:

  • Double debits. A bet request times out, the provider retries, and the platform subtracts the stake twice. The fix is idempotency: the same transaction ID must always produce the same result.
  • Lost rollbacks. A rollback arrives before the bet it refers to, is rejected, and the bet then lands and is never refunded.
  • Rounding differences. The provider sends amounts in cents, your wallet uses decimals, and the balances drift by fractions.
  • Sessions that expire mid-round. A win arrives after the session token has expired and is refused, so the player is not paid.
  • Game IDs that change. A provider renames or re-releases a game and your lobby links, favourites and reports break.

All of them are cheaper to prevent in staging than to reconcile by hand later.

Licensing in one paragraph

Content providers generally require the operator to hold a gambling licence, or to operate under the licence of a white-label platform that carries that responsibility. An aggregator's supplier agreements do not replace an operator licence, although some aggregators onboard operators who do not hold their own. Which markets you may accept players from is set by the licence, by the provider's own restricted-country list, and by local law. Check all three before you build a lobby for a market, because a provider can be blocked in a country where your licence is valid.