Balance request
The request is made when the user enters the system.
NOTE: Please use this tool to check your integration implementation for seamless wallet operations: https://tests.evenbetgaming.com/seamless/
Request header (HTTP Header)
Parameter Name | Description | Optional / Mandatory | Data type |
---|---|---|---|
sign | Request signature | Mandatory | string |
Request parameters
Parameter Name | Description | Optional / Mandatory | Data type |
---|---|---|---|
method | GetBalance | Mandatory | string |
userId | User identifier | Mandatory | string |
currency | ISO currency code | Mandatory | string |
Optional parameters
Parameter Name | Description | Data type |
---|---|---|
sessionId | Session identifier or unique token of session | string |
Request validation
Upon receipt it is required to validate the request according to the following rules:
- Request parameters, marked as Mandatory, must be passed in the request. If this does not happen, then the error “Invalid request params” has to be returned.
- sign. The request signature must match the parameters passed. In case it does not, then the error “Invalid signature” has to be returned.
- userId must exist. If a player does not exist, then the error “Player not found” has to be returned.
- currency must be a valid currency ISO-code that is used in your system. If it is not, then the error “Invalid request params” has to be returned.
If an error occurs please return the parameters errorCode and errorDescription only.
Response parameters
A response to a request is expected to be in JSON. Response parameters:
Parameter Name | Description | Optional / Mandatory | Data type |
---|---|---|---|
balance | Current player’s balance in Cents | Mandatory** | integer |
errorCode | Error code if the request does not come through successfully, and 0 in any other case. | Mandatory | integer |
errorDescription | Error description in case the request has not been successfully handled. | Optional | string |
**In case errorCode != 0 is returned, the balance parameter becomes optional and is not validated on the Evenbet side.
Resending the request
If any error message is received, the Request is not going to be resent.
Request example
{
"method": "GetBalance",
"userId": 123456,
"currency":"USD",
}
Response example
{
"balance": 12300,
"errorCode": 0,
"errorDescription":"",
}