Launch Verification
Launch verification is part of Surface 4. When a browser connects over WebSocket, the game service forwards the launch parameters to the platform to verify them. It is the gateway to all gameplay: success returns the full session, failure rejects the connection.
POST /internal/verify-launch
Section titled “POST /internal/verify-launch”Query parameters (optional but recommended):
?for=<service_uid> // preferred?for=<service_slug> // backward compat?for=<service_uid> makes the platform confirm the resolved game actually
belongs to this service. The service_uid is learned from the first
desired-state push (never hardcoded). Older services may use ?for=<slug>.
Headers:
Content-Type: application/jsonx-internal-verify-launch-secret: <secret>Request body (the browser’s launch URL parameters, forwarded server-side during the WebSocket handshake):
{ "gameId": 9000, "demo": false, "currency": "EUR", "token": "d315fa12770e65eb4af38c589aed0d", "customer": "3773", "organizationId": 1903, "trader": "cx-12", "locale": "en"}Response (200) — success. The response is a flat object — not nested
under a session key:
{ "ok": true, "gameExternalId": 9000, "engineType": "wp9dvdgp4wfqmxq4", "skinKey": "default", "demo": false, "currency": "EUR", "showBalance": true, "locale": "en", "requestedLocale": "en", "organizationId": 1903, "partnerId": 1, "partnerConfig": {}, "customer": "3773", "token": "d315fa12770e65eb4af38c589aed0d", "operatorId": "cx-12", "operatorName": "ACME Casino", "playerId": "P-5A666", "playerDisplay": "Player3773", "walletBalance": 1000.00, "walletCurrency": "EUR", "saveDemoBets": false, "betMin": 1, "betMax": 100, "maxWin": 10000, "quickBets": [1, 5, 10, 50]}| Field | Description |
|---|---|
ok | true — the launch is valid. |
gameExternalId, engineType, skinKey | Which game / engine / skin this launch is for. |
demo | Demo or real mode. |
currency | The session currency. |
showBalance | Whether the UI shows the balance. |
locale, requestedLocale | Localization language. |
organizationId, partnerId, operatorId, operatorName, partnerConfig | Partner/operator info. |
customer, token, playerId, playerDisplay | Player identity. |
walletBalance, walletCurrency | Real-mode current wallet state (fetched from the operator). |
saveDemoBets | Whether demo bets are persisted. |
betMin, betMax, maxWin, quickBets | Bet limits resolved for this launch. Store as a session-level snapshot; do not re-fetch per round (see bet templates for per-round refresh). |
Response (400) — failure:
{ "ok": false, "message": "Wallet currency mismatch: launch=EUR, partner=USD" }Common messages — forward them verbatim to the WebSocket; the player sees
them as connect_error in the browser:
| Message | Meaning |
|---|---|
"Unknown gameId" | The gameId is unknown to the platform |
"Missing mandatory params: customer, token" | A required real-mode field is missing |
"Currency not allowed for this partner" | Not on the partner allowlist |
"Partner suspended" / "Operator suspended" | Account suspended |
"Partner wallet auth failed: ..." | Real-mode authenticate failed |
"Betting limits are not configured for this partner" | Missing bet template |
Response (403):
{ "ok": false, "message": "Forbidden" }A wrong or missing x-internal-verify-launch-secret.
Storing the session: the resolved fields go into the WebSocket connection’s in-memory state, read for the rest of the session.
Real mode vs. demo mode
Section titled “Real mode vs. demo mode”verify-launch behaves differently in the two modes.
Demo mode (demo: true):
- Only
gameIdis required; the rest is optional. currency,walletBalance,betMin,betMax,maxWin, andquickBetscome from the runtime profile (or a hardcoded default).- No operator wallet call is made.
- Bets are still written to the ledger, flagged
is_demo: trueand filtered out of reporting.
Real mode (demo: false or omitted):
gameId,currency,token,customer,organizationId, andtraderare all required. A missing field returns 400.- The platform calls
authenticateon the partner wallet; the wallet currency must match the launch currency. betMin,betMax, … are resolved from bet templates (operator+game override, partner default, …).
The full launch handshake, including the browser side, is in the Gameplay Protocol.