Download OpenAPI specification:
Gamble Hub API v1.0 — Integration Guide.
getBalance, writeBet, rollback) with X-Signature.POST /apiIndividualWallet/ (userCreate, userCash, userInfo). No callbacks.Login endpoint.
Request:
POST https://office-api-dev.gamble-hub.net/auth/loginapplication/x-www-form-urlencodedlogin, passwordIMPORTANT:
accessTokenhas limited TTL. After expiry, call/auth/loginagain.
COMMON ERROR: do not send JSON here. Use
application/x-www-form-urlencoded, otherwise expect HTTP 400 or 401.
| login required | string |
| password required | string |
login=casino_operator&password=Qx9%23mK2%21pLnR
{- "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI0ODFlM2M5Yi03N2YyLTRkMWEtYjgzMi05YzVlMGY4YTJkMTQiLCJsb2dpbiI6ImNhc2lub19vcGVyYXRvciIsInJvbGUiOiJVc2VyIiwiaWF0IjoxNzQ1NzQ4MDAwLCJleHAiOjE3NDU4MzQ0MDB9.Xk2mN9pQrL4vJsT8hDfW3uCbYoKgP7nAeRtMzIqVl5c",
- "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI0ODFlM2M5Yi03N2YyLTRkMWEtYjgzMi05YzVlMGY4YTJkMTQiLCJ0eXBlIjoicmVmcmVzaCIsImlhdCI6MTc0NTc0ODAwMCwiZXhwIjoxNzQ2MzUyODAwfQ.mP3qRsNvTcYdJkW8xBfL2eAoGhI9ZuQlXrKtDyEwH6n",
- "user": {
- "id": "481e3c9b-77f2-4d1a-b832-9c5e0f8a2d14",
- "login": "casino_operator",
- "role": "User",
- "currencies": [
- {
- "currency": "USD",
- "count": "12450.00"
}, - {
- "currency": "EUR",
- "count": "8320.50"
}
]
}
}| user_id required | string |
| currencyISO required | string Currency in ISO format (e.g., USD, EUR). |
[- {
- "id": "integration_a:provider_a:game_001",
- "isEnabled": true,
- "title": "Fortune Tiger",
- "provider": "PG Soft"
}, - {
- "id": "integration_b:provider_b:game_042",
- "isEnabled": true,
- "title": "Speed Roulette",
- "provider": "Evolution"
}
]Open game session.
X-Signature over raw JSON body.demo = "1": demo mode, no wallet callbacks.demo = "0": real gameplay.callbackUrl: optional override for the admin-panel callback URL.ip: optional player IP. Required only for some providers; ask support if your provider requires it.| X-Signature required | string Examples: 9b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d Hex HMAC-SHA256 over raw JSON body bytes using the user secret. |
| currency required | string Game session currency (USD, EUR etc.) |
| demo required | string Enum: "0" "1" "1" to start demo mode (no callbacks), "0" – real gameplay. |
| exitUrl required | string <uri> |
| gameId required | string |
| language required | string ISO (en, es, fr, de etc.) |
| player_login required | string Login name of the player that starts the game. |
| user_id required | string API user ID. |
| ip | string Optional player IP address. Some providers require it for launch, risk checks, or jurisdiction rules. Ask support if your provider requires |
| callbackUrl | string <uri> Override default callback URL in admin panel. Leave empty for default. |
{- "currency": "USD",
- "demo": "0",
- "gameId": "integration_a:provider_a:game_001",
- "language": "en",
- "player_login": "alex_morozov_88",
- "user_id": "481e3c9b-77f2-4d1a-b832-9c5e0f8a2d14",
- "ip": "8.8.8.8",
}{- "status": "success",
- "error": "",
- "content": {
- "gameRes": {
- "sessionId": "7d3b9e2a-4f1c-8d06-a912-c3e5f7b29041"
}
}
}Seamless wallet callbacks: provider → merchant.
X-Signature.transactionId as the idempotency key.writeBet: return current balance, do not apply again.IMPORTANT: if
getBalancereturns HTTP 400, do not start the spin. Do not use default or cached balance.
Provider asks for current player balance.
X-Signature.status: "success" only when balance is confirmed.IMPORTANT: HTTP 400 means
Fail / retry. Do not start the spin. Do not use default or cached balance.
| X-Signature required | string Examples: 9b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d Hex HMAC-SHA256 over raw JSON body bytes using the user secret. |
| cmd required | string Value: "getBalance" |
| login required | string |
| sessionid required | string |
{- "cmd": "getBalance",
- "login": "alex_morozov_88",
- "sessionid": "7d3b9e2a-4f1c-8d06-a912-c3e5f7b29041"
}{- "balance": 2500,
- "currency": "USD",
- "error": "",
- "login": "alex_morozov_88",
- "status": "success"
}Apply bet/win to merchant wallet.
Rules:
status: "success".status: "fail".transactionId.transactionId: return HTTP 200, current balance, do not apply again.IMPORTANT: if player balance is insufficient for the bet, reject
writeBet. Providers do not calculate or reserve funds usinggetBalance.
IMPORTANT: successful response
balancemust be after applying the operation, not before.
| X-Signature required | string Examples: 9b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d Hex HMAC-SHA256 over raw JSON body bytes using the user secret. |
| cmd required | string Value: "writeBet" |
| bet required | number |
| win required | number |
| login required | string |
| sessionid required | string |
| transactionId required | string Unique transaction ID of each callback. Must not repeat. |
| gameId | string Unique game ID forwarded from openGame request. |
| round_finished required | boolean Round was finished. |
| info required | string Bet and win details from providers. |
{- "cmd": "writeBet",
- "bet": 25,
- "win": 0,
- "login": "alex_morozov_88",
- "sessionid": "7d3b9e2a-4f1c-8d06-a912-c3e5f7b29041",
- "transactionId": "txn_a3f7c912-d0e5-b841-9f2c-3e6a7d8b01c4",
- "round_finished": false,
- "info": "{\"gameType\":\"slots\",\"betPerLine\":1.25,\"lines\":20,\"roundId\":\"r_9f4a2c7b\"}"
}{- "balance": 2475,
- "currency": "USD",
- "error": "",
- "login": "alex_morozov_88",
- "status": "success"
}Roll back the original bet.
transactionId must match the original bet transaction ID.| X-Signature required | string Examples: 9b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d Hex HMAC-SHA256 over raw JSON body bytes using the user secret. |
| cmd required | string Value: "rollback" |
| bet required | number The rollback amount matches the bet amount when the wager was accepted. |
| win required | number win (0) |
| login required | string |
| sessionid required | string |
| transactionId required | string The rollback transaction matches the bet transaction (same transaction ID). |
| round_finished required | boolean (true) |
| info required | string |
| gameId required | string |
{- "cmd": "rollback",
- "bet": 25,
- "win": 0,
- "login": "alex_morozov_88",
- "sessionid": "7d3b9e2a-4f1c-8d06-a912-c3e5f7b29041",
- "transactionId": "txn_a3f7c912-d0e5-b841-9f2c-3e6a7d8b01c4",
- "round_finished": true,
- "info": "{\"reason\":\"provider_timeout\",\"originalRound\":\"r_9f4a2c7b\"}",
- "gameId": "integration_a:provider_a:game_001"
}{- "balance": 2500,
- "currency": "USD",
- "error": "",
- "login": "alex_morozov_88",
- "status": "success"
}Transfer wallet: merchant → Gamble Hub.
POST /apiIndividualWallet/userCreate, userCash, userInfoX-Signature flow as openGame and webhooks.Transfer wallet command endpoint.
Required fields: cmd, user_login, user_id.
Commands:
userCreate: create player wallet.userCash: change balance (operation = in|out).userInfo: return current balance.Signing:
X-Signaturesecret_api_key by user_iduserCash.cash must be a decimal string with 2 fractional digits.
| X-Signature required | string Examples: 9b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d8b7c2b6e0f5d Hex HMAC-SHA256 over the exact raw JSON body using the player-specific |
| cmd required | string Enum: "userCreate" "userCash" "userInfo" Transfer wallet command.
|
| user_login required | string Player login within the merchant hall. |
| user_id required | string User identifier. |
| operation | string Enum: "in" "out" Required for
|
| cash | string (TransferMoneyAmountString) Monetary amount in |
{- "cmd": "userCreate",
- "user_login": "test_player",
- "user_id": "481e3c9b-77f2-4d1a-b832-9c5e0f8a2d14"
}{- "status": "success",
- "microtime": 0.004074077606201,
- "date_time": "2024-04-12 12:01:40",
- "error": "",
- "content": {
- "id": "111111",
- "player_login": "test_player",
- "notification": "",
- "cash": "0.00"
}
}