Skip to content

Placing a bet by the player ​

Overview ​

Request typeURL
POST<server-partner>/bet

This method allows the player to place a bet.

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
amountstringTransaction amount
currencystringThe currency in which the game will be played
partnerIdbigintUnique partner identifier
playerIdstringUnique player identifier in the partner’s system
gameIdbigintUnique identifier of the game
roundIdbigintUnique identifier of the betting round
transactionIdbigintUnique identifier of the provider's betting transaction
sessionIdstringoptional*Unique game session identifier in the partner's system
hashstringSignature (sha256 from encryption string)
isBonusBuybooleanoptionalFlag indicating whether the round was played using the bonus buy feature

If /bet/win per free spin setting is applied:

isFreespinBetbooleanoptionalFlag indicating whether the round was played within a freespin campaign
campaignExtIdstringoptionalUnique identifier of the campaign in the partner’s system
leftSpinsbigintoptionalAmount of freespin rounds still available to the player after the current round has been played
spinCountbigintoptionalTotal number of freespin rounds
currentSpinsbigintoptionalNumber of freespin rounds that have already been played

String to hash

"bet" + amount + currency + partnerId + playerId + gameId + roundId + transactionId + sessionId* + apiKey

Response ​

NameTypeDescription
balancestringPlayer's current balance
transactionIdstringUnique identifier of the betting transaction in the partner’s system.

Example ​

Request ​

js
{
    amount: '10.00',
    currency: 'USD',
    partnerId: 1,
    playerId: '432',
    gameId: 3,
    roundId: 7665,
    transactionId: 35,
    sessionId: '123',
    isBonusBuy: false,
    hash: '433e73d9de350fdae70a85634de4eedb2923868ea09f8e35423b25ec2b0a3762'
}

Response ​

js
{  
    status: 'success'  
    data: {  
        balance: '10113.63',   
        transactionId: '1333882828'  
    }  
}

Errors ​

Possible error messages:

MessageDescription
RequiredParamsNotFoundIncorrect number of parameters in the request
InvalidParamTypeIncorrect parameter type
PlayerLowBalanceInsufficient funds on player's balance
CurrencyNotFoundCurrency with such code not found
IncorrectHashIncorrectly calculated hash
ServerErrorServer error

In case of a PlayerLowBalance error, the /refund request will not be sent.