Get balance
Request
URI: /getBalance?{parameters}
Example usage: https://{callback_url}/getBalance?{parameters}
The request is executed using the GET
method.
This method is used to retrieve the data on the user's balance.
A player may have multiple balances, if a bonus was activated.
In this case, the player will have a total, real and bonus balance.
Request parameters
Name | Type | Required | Description |
---|---|---|---|
token | string | Yes | Authorization code of user's session Restrictions: 1..250 |
userId | string | Yes | The unique identifier of the user |
Response parameters
Name | Type | Required | Description |
---|---|---|---|
status | boolean | Yes | Response status code for Call back API Accepted values: true , false |
balance | decimal | Yes | Player's latest balance, at the time of the request completion balance is the sum of realBalance and bonusBalance parameters Decimal format required Player's balance is rounded to the smallest currency unit Maximum possible value: 999999999999999999.99 999999999999.99999999 |
realBalance | decimal | Yes | Player's latest balance, at the time of the request completion Decimal format required Maximum possible value: 999999999999999999.99 999999999999.99999999 |
bonusBalance | decimal | Yes | Player's latest balance, at the time of the request completion Decimal format required Maximum possible value: 999999999999999999.99 999999999999.99999999 |
errors | object | No | Description of errors in case status = false |
errors.code | number | No | Error code |
errors.error | string | No | Error description |
Example of a successful response
Response: /getBalance?{parameters}
{
"status": true,
"balance": 124999.99,
"realBalance": 124999.09,
"bonusBalance": 0.90,
}
Example of an unsuccessful response
Response: /getBalance?{parameters}
{
"status": false,
"errors": {
"code": 400,
"error": "Description"
}
}