7. GET BALANCE API

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

TypeInput
MethodPOST
URLhttps://<OPERATOR-API-BASE-URL>/get_balance
Headers "Content-Type": "application/json"
POST ParametersJSON 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

ParameterTypeDescriptionOptional
account_idStringPlayer Account IDYes
session_idStringToken received from game launch request
game_config_idIntegerGame IDYes
hash_keyStringThe computed md5().hex digest() value of
(session_id+ secret key)
7.3 Response Parameters
ParameterTypeDescription
cashDecimalCash balance
currencyStringThe 3-letter ISO 4217 currency code of the player
account_idStringPlayer Account ID
session_idStringToken received from game launch request
modeStringMode of play, for example:
‘Real’ - when playing with real cash
‘GoldCoins’- when playing with gold coins
‘SweepCoins’- when playing with sweep coins
gold_coinsDecimalGold coins balance.
(applicable only for mode=GoldCoins)
sweep_coinsDecimalSweep 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".
}