GeeWin
Developer DocsBuild & publish your own casino games
Provably Fair

Build casino games with a single HTML file.

You handle UI and game design. GeeWin handles randomness, balances, payouts, and provably fair verification.

How It Works

Your game runs inside a sandboxed iframe on the GeeWin platform. All communication happens via the browser's postMessage API — your game sends bet/action messages to the platform, and the platform responds with results.

Message Flow
Your Game
HTML / JS
bet / action
postMessage
result / event
Platform
RNG & Payouts

Your game never touches real money, balances, or RNG — the platform handles all of that server-side.

You Build
  • 1. An HTML file with your game UI
  • 2. A GAME_CONFIG declaring which primitive + settings
  • 3. postMessage calls to place bets and get results
Platform Handles
  • Provably fair RNG
  • 97% RTP enforcement
  • Balance management & payouts
  • Session management

Quick Start

Every game is an HTML file with two things: a config and postMessage communication.

1<script>
2 // 1. Declare your game config
3 window.GAME_CONFIG = {
4 primitive: 'one-shot',
5 multipliers: [0, 0.5, 1, 2, 5, 10, 50]
6 };
7
8 // 2. Place a bet
9 function bet() {
10 parent.postMessage({
11 type: 'bet',
12 id: Date.now(),
13 stake: window.GAME_STAKE,
14 currency: window.GAME_CURRENCY
15 }, '*');
16 }
17
18 // 3. Get the result (matched by id)
19 window.addEventListener('message', (e) => {
20 if (e.data.type === 'betResult' && e.data.id) {
21 const { multiplier, payout, result } = e.data.result;
22 // result = 'WIN' | 'LOSS' | 'PUSH'
23 // Animate your game with the result
24 }
25 });
26
27 // 4. Tell the platform you're ready (required!)
28 parent.postMessage({ type: 'gameReady' }, '*');
29</script>

Choose a Primitive

Each primitive handles a different type of game. Pick the one that fits your game design.

Quick Reference

PrimitiveBet TypeExample Games
One ShotSingle outcome per betSlots, dice, wheel, plinko
PathPick tiles, cash out anytimeMines, towers
MultiplierRising value, cash out before crashCrash, aviator, moon
PVP EscrowPlayer vs playerRPS, coin flip duels
State MachineMulti-step with actionsBlackjack, poker, craps

Platform Variables

The platform injects these into your game's window before it loads:

VariableTypeDescription
window.GAME_STAKEnumberBet amount in crypto units (set by player in platform UI)
window.GAME_STAKE_USDnumberBet amount in USD
window.GAME_CURRENCYstring'ETH' | 'SOL' | 'USDT'
window.TEST_MODEbooleantrue when in preview/test mode
window.PREVIEW_MODEbooleantrue when game is running in the preview sandbox
window.GAME_CONFIG_FOR_APIobjectConfig formatted for API (preview only — include in postMessages so the platform can validate without an upload)