This call is made to get the current player balance from the Operator. This may be called several
times during the gameplay.
7.1 Balance Request
| Type | Input |
| Method | POST |
| URL | https://<OPERATOR-API-BASE-URL>/get_balance |
| Headers | "Content-Type": "application/json" |
| POST Parameters | JSON Object |
| Example | { "account_id": "123", "session_id": "0b3fcbee-9c1e-4c8b-b97a- 8d1746a8a96a", "game_config_id": 10, "hash_key": "abcd-efgh-1234" } |
7.2 Request Parameters
| Parameter | Type | Description | Optional |
| account_id | String | Player Account ID | Yes |
| session_id | String | Token received from game launch request | |
| game_config_id | Integer | Game ID | Yes |
| hash_key | String | The computed md5().hex digest() value of (session_id+ secret key) |
7.3 Response Parameters
| Parameter | Type | Description |
| cash | Decimal | Cash balance |
| currency | String | The 3-letter ISO 4217 currency code of the player |
| account_id | String | Player Account ID |
| session_id | String | Token received from game launch request |
| mode | String | Mode of play, for example: ‘Real’ - when playing with real cash ‘GoldCoins’- when playing with gold coins ‘SweepCoins’- when playing with sweep coins |
| gold_coins | Decimal | Gold coins balance. (applicable only for mode=GoldCoins) |
| sweep_coins | Decimal | Sweep coins balance. (applicable only for mode=SweepCoins) |
7.4 Example Balance Response
{
"cash": "199.00",
"currency": "USD",
"account_id": "1",
"session_id": "0b3fcbee-9c1e-4c8b-b97a-8d1746a8a96a",
"mode": "Real"
}
7.5 Example Error Response
The error response indicates a hash validation failure (code 5011) with the message "InvalidHash,"
providing details about the unsuccessful hash validation process. Refer to section 12 for more
information.
{
"error": true,
"code": 5011,
"message": "InvalidHash",
"detail": "Hash Validation failed".
}