GetBalance
GetBalance
Returns the current balance in the specific player account.
Responsibilities of the casino platform
The casino platform must confirm the validity of the incoming game session ID and that it is connected to the given account ID. The casino platform must also return the player’s current balance, both the bonus balance and the real balance.
Request Parameters
| Parameter | Data Type | Mandatory | Description |
|---|---|---|---|
accountid |
String(60) [0-9a-zA-Z] | Required | Account ID Example: 5179068 |
apiversion |
String | Required | The API version that will be used Example: 1.2 |
device |
String | Required | The device currently used by the player Valid values: desktop or mobile |
gamesessionid |
String(64) | Required | The game session id from the start game Example: 11_99d71938-c2d9-4844-b950-d598c2es |
nogsgameid |
String | Required | Groove game ID Note: Can contain letters and special characters Example: 80102, game_123, slot-abc |
request |
String | Required | Request method name Example: getbalance |
Request Example
/groove?request=getbalance&gamesessionid=123_jdhdujdk&accountid=111&device=desktop&nogsgameid=80102&apiversion=1.2Response Parameters
| Parameter | Data Type | Mandatory | Description |
|---|---|---|---|
apiversion |
String | Required | The version of the API being used Example: 1.2 |
balance |
Decimal (32,10) | Required | The total balance amount (real + bonus) Examples: 500, 140.25 |
bonus_balance |
Decimal (32,10) | Optional | The player’s bonus balance Example: 50.0 |
code |
Integer | Required | Response code Example: 200 |
game_mode |
Integer | Optional* | Combined real and bonus modes 1 = Real mode 2 = Bonus mode *Required for CMA-compliant games |
order |
String | Optional* | The type of order Valid values: cash_money, bonus_money*Required for CMA-compliant games |
real_balance |
Decimal (32,10) | Required | The player’s real balance Example: 100.0 |
status |
String | Required | The status of the response Example: Success |
Response Examples
Success Response
{
"code": 200,
"status": "Success",
"balance": 100,
"bonus_balance": 50,
"real_balance": 50,
"game_mode": 1,
"order": "cash_money, bonus_money",
"apiversion": "1.2"
}Error Response
{
"code": 1,
"status": "Technical error",
"message": "Technical error",
"apiversion": "1.2"
}Error Codes
| Code | Status | Message |
|---|---|---|
| 1 | Technical error | Technical error |