Who calls whom

There are two directions. Your server calls WGC to open a game and to look up what became of an operation. WGC calls your Callback URL for the player's balance and for every bet and win, because in the seamless wallet model the player's money stays in your casino and WGC does not store a player balance. The wallet calls are three commands: getBalance, writeBet and rollback. Keeping the direction clear explains most of the round: the first step is yours to start, steps two to four are WGC asking you, and the last step is you asking WGC.

Step 1: launch

Your server calls POST /v1/sessions with a player id, a currency, a mode and one game number. The answer carries a launch link and a session id.

POST /v1/sessions
{"publicId":"sweet-bonanza-1","playerId":"casino-side-player-42","currency":"USD","mode":"demo","language":"en"}
→ 200 { "ok": true, "requestId": "req_…", "data": { "url": "https://play.worldgamingconnect.com/play/Zk3p9xQ2vL8mTn4r", "sessionId": "cmgq3r8v40001l8xyz5k2abcd", "expiresAt": "2026-10-12T10:45:00.000Z" } }

The player id is 1 to 64 printable ASCII characters, and it names a player in your own system. The link is opened in the player's browser, not fetched from your server. A link that no browser has opened works for 5 minutes; after it is opened it lives as long as the player keeps playing. You answer nothing at this step.

Step 2: the balance

When the game starts, it asks for the player's balance, and WGC sends getBalance to your Callback URL.

{ "command": "getBalance", "playerId": "casino-side-player-42", "currency": "USD", "requestId": "req_…", "timestamp": "2026-10-12T10:15:00.500Z" }
← { "ok": true, "balance": 123.45, "currency": "USD" }

Every call is signed, and you check the signature on the raw body before you parse it. A refusal is written in the body, for example { "ok": false, "error": "insufficient_funds" }, with status 200.

Step 3: the stake

The player presses spin, and WGC sends writeBet with a bet above zero and a win of zero. It carries a new transactionId and a roundId.

{ "command": "writeBet", "playerId": "casino-side-player-42", "currency": "USD", "bet": 1.00, "win": 0.00, "roundId": "3f1c2a64-8d0b-4e57-9b7a-5c2e1d0f9a41", "gamePublicId": "sweet-bonanza-1", "transactionId": "5f0b1c2e-7a64-4d6e-9a3b-0c1d2e3f4a5b", "kind": "play", "requestId": "req_…", "timestamp": "2026-10-12T10:15:01.000Z" }
← { "ok": true, "balance": 122.45 }

You debit the player once for that transactionId and answer with the new balance. If you refuse, nothing is debited and the round does not go on. kind is play or refund, and jackpot only once your manager has switched jackpots on for your account.

Step 4: the result

The result arrives as another writeBet with the same roundId: a new transactionId, a bet of zero and a win that is the payout.

{ "command": "writeBet", "playerId": "casino-side-player-42", "currency": "USD", "bet": 0.00, "win": 2.50, "roundId": "3f1c2a64-8d0b-4e57-9b7a-5c2e1d0f9a41", "gamePublicId": "sweet-bonanza-1", "transactionId": "9a1d7c33-52b8-4f0e-8c64-2d7e0b5a1f93", "kind": "play", "requestId": "req_…", "timestamp": "2026-10-12T10:15:02.000Z", "roundFinished": true }
← { "ok": true, "balance": 124.95 }

Some games send the bet and the result in one call. Others send them apart, and WGC joins them into one round, so both calls travel under one roundId. roundFinished: true marks the end of the round, and when the key is missing you treat the round as still open.

Step 5: no answer in time

WGC waits 3 seconds for your answer, and an answer counts only with a 2xx status. If the answer does not come in time, or cannot be read, the stake is refused to the game provider and the operation becomes unknown: WGC does not know whether you booked it. Nothing is asked of you yet. Two shorter deadlines work inside WGC: a stake that waited more than 1.5 seconds before your Callback is not sent to you, and nothing is taken from the player; an accepted stake whose answer could not reach the game provider within 4.5 seconds is cancelled at once through a rollback.

Step 6: rollback

After an unknown outcome WGC sends rollback to the same URL with the same transactionId.

{ "command": "rollback", "transactionId": "5f0b1c2e-7a64-4d6e-9a3b-0c1d2e3f4a5b", "playerId": "casino-side-player-42", "currency": "USD", "bet": 1.00, "win": 0.00, "reason": "unknown_outcome", "requestId": "rb:5f0b1c2e-7a64-4d6e-9a3b-0c1d2e3f4a5b:1", "timestamp": "2026-10-12T10:16:01.000Z" }
← 200 { "balance": 123.45 }

If you booked that transactionId, you reverse it entirely: the bet goes back and the win is taken back. If you never booked it, you change nothing and still answer with the balance. The reason is unknown_outcome when your answer never reached WGC; a game provider that cancels a settled transaction has a reason of its own. WGC repeats a rollback that is not taken: about a minute after the missing answer, then after 5, 15, 60, 360 and 1,440 minutes, then once a day until 30 days have passed since the bet. For that reason keep your records of operations for at least 30 days. A casino may also answer 404, 405 or unknown_command to say it does not implement rollbacks, and that is not an error.

Step 7: reconciliation

At any time your server can ask WGC what it recorded, using the numbers your casino saw.

GET /v1/rounds/3f1c2a64-8d0b-4e57-9b7a-5c2e1d0f9a41
→ 200 { "ok": true, "requestId": "req_…", "data": { "roundId": "3f1c2a64-…", "status": "closed", "bet": "1.00", "win": "0.00", "ggr": "1.00", "transactions": [ { "transactionId": "5f0b1c2e-…", "status": "accepted", "balance": "122.45", … } ], "actions": ["bet","no_win"], … } }

An operation has the status accepted, refused, failed or unknown, and a round also shows ggr, which is the bet minus the win. The actions list says in WGC's own words what happened, for example bet, win, no_win or rollback; treat an unfamiliar code as information and do not branch money on it. Requests reach back 65 days; older events sit in the WGC archive and are searched by hand on request. Another account's number reads exactly like a number that does not exist.

Rehearse the round without money

A test key opens a test game, WGC Test Slot, where each spin makes two real calls to your Callback URL, a bet and then a result, marked with "test": true. No money moves. An option to lose the answer checks your rollback: the operation becomes unknown, and about a minute later a rollback arrives. In the back office, Integration check shows every call live, and the integration test runs 14 checks of your wallet. See demo and test mode, the integration steps and the Casino API overview.