Everything you need to embed casino games into your platform — from server-to-server auth and wallets to mounting the game UI in a browser.
You own the player identity and wallet. BetterPlay hosts the game logic. Your backend mints launch tokens; your frontend mounts the game UI.
mountOperatorGame()You run a game aggregation platform. Provision operators under your account, mint launch tokens on their behalf, and embed games across your brand network.
The operator harness mounts any game right in your browser — offline in demo mode with mock responses, or against a real games-backend to walk the full JWT /launch flow end-to-end. The aggregator variant adds key verification, operator provisioning, and token minting.
BetterPlay owns all game logic, round state, and RNG. You own the player and the money. Two layers connect them: a server-to-server wallet API and a browser UI library.
/launch. Lowest effort.
mountOperatorGame() inside your own page. Maximum control.
The only mandatory pieces: a sized container, the bundle URL, and one mountOperatorGame() call. Use demoMode: true to run with no backend at all — swap it for a real sessionToken when you go live.
<!-- 1. Sized container — game fills it; definite height is required -->
<div id="game" style="width:100%; height:720px;"></div>
<script type="module">
// 2. Bundle must be served same-origin as the page (avoids CORS on dynamic import)
const bundle = `${location.origin}/betterplay/betterplay-games.es.js`;
const manifest = `${location.origin}/betterplay/manifest.json`;
// 3. Import the library and mount
const { mountOperatorGame } = await import(/* @vite-ignore */ bundle);
await mountOperatorGame(document.getElementById('game'), {
game: 'dice', // crash · dice · mines · limbo · wheel · plinko…
demoMode: true, // ← no backend needed; remove for production
backendUrl: 'https://api.betterplay.com/games/api',
cdnUrl: 'https://cdn.wasabi.casino',
session: { player: 'demo-1', currency: 101, balance: 1000 },
library: { bundle, manifest },
});
</script>
demoMode and add a sessionToken field inside session — minted server-side from your backend's launch endpoint and never put in browser source code. See the full launch flow in the Operator Guide §2.