Action 6: Get Balance
Function Description
- Return player’s remaining account balance.
- When the player logs into the game, it will call once every five seconds until the player leaves the game.
- When the player logs into the game lobby, it will call once every three seconds until the player leaves the game.
- We have the opportunity to call this API to retrieve the balance when the player is offline, and use it for partial transaction retry scenarios in case of failures.
Request Parameter
Parameter | Format | Description |
---|---|---|
action | Integer | 6 |
ts | Long | Current system time |
uid | String(50) | Player ID, Only allow a-z & 0-9 and underscores (_) and hyphens (-) |
currency | String(10) | Please refer to: Currency Code |
gType | Integer | Game types See Game Provider If the purpose of the request is to manipulate the wallet, the corresponding game type code will be returned. (Manipulating the wallet refers to processes such as betting, settlement, cancellation, and corresponding retries.) If for other purposes, 999 will be returned. (e.g., game lobby balance, etc.) |
mType | Integer | Machine Type If the purpose of the request is to manipulate the wallet, the corresponding machine type code will be returned. (Manipulating the wallet refers to processes such as betting, settlement, cancellation, and corresponding retries.) If for other purposes, 999 will be returned. (e.g., game lobby balance, etc.) |
systemSessionId | String(150) | System Session ID, will be different in each login when using action 21 get game launch url. Game Type supports range: SLOT(0), FISH(7), ARCADE(9), LOTTERY(12), CARD(18) If the player is offline, return "PLAYER_IS_OFFLINE_SYSTEM_SESSION_ID". This is not included by default, contact JDB service if needed. |
Request Example
{
"action": 6,
"ts": 1447452951820,
"uid": "testpl01",
"currency": "RB",
"gType": 0,
"mType": 8001
}
Response Parameter
Parameter | Format | Description |
---|---|---|
status | String(4) | Success: 0000It would be considered as failure if the status is not 0000, and you can describe in err_text. |
balance | Double | BalanceReturn status 0000 and balance 0 when player's balance is 0. |
err_text | String(255) | Error message |
Response Example
{
"status": "0000",
"balance": 12345.67,
"err_text": ""
}