Skip to content

Obtaining a player’s balance ​

Overview ​

Request typeURL
GET<server-partner>/balance

This method allows you to get the current player's balance.

Notice

The request is executed by the provider.

Parameters ​

Request ​

Optional fields are excluded from hash calculations.
Optional* fields are included in hash calculations only if they are provided.

NameTypeDescription
currencystringCurrency in which the game is played
partnerIdbigintUnique partner identifier
playerIdstringUnique player identifier in the partner’s system
hashstringSignature (sha256 from encryption string)
sessionIdstringoptional*Unique game session identifier in the partner’s system

String to hash

“balance” + currency + partnerId + playerId + sessionId* + apiKey

Response ​

NameTypeDescription
balancestringPlayer's current balance

Example ​

Request ​

js
{  
    currency: 'USD',  
    partnerId: 1,  
    playerId: '432',  
    sessionId: '123',  
    hash: 'bafb050a6f04d30d6b684f024a5e38c97f8de84b7c957bbd357e6da867cf2f3c'  
}

Response ​

js
{  
    status: 'success'  
    data: {  
        balance: '10103.63'  
    }  
}

Errors ​

Possible error messages:

MessageDescription
RequiredParamsNotFoundIncorrect number of parameters in the request
InvalidParamTypeIncorrect parameter type
CurrencyNotFoundCurrency with such code not found
IncorrectHashIncorrectly calculated hash
ServerErrorServer error