Skip to main content

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 NameDescriptionOptional / MandatoryData type
signRequest signatureMandatorystring

Request parameters

Parameter NameDescriptionOptional / MandatoryData type
methodGetBalanceMandatorystring
userIdUser identifierMandatorystring
currencyISO currency codeMandatorystring

Optional parameters

Parameter NameDescriptionData type
sessionIdSession identifier or unique token of sessionstring

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 NameDescriptionOptional / MandatoryData type
balanceCurrent player’s balance in Cents Mandatory**integer
errorCodeError code if the request does not come through successfully, and 0 in any other case. Mandatoryinteger
errorDescriptionError description in case the request has not been successfully handled.Optionalstring

**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":"",
}