Skip to content

Crediting the player's winnings ​

Overview ​

Request typeURL
POST<server-partner>/win

This method allows to credit the player's winnings.

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
betTransactionIdbigintUnique identifier of the betting transaction in the partner's system
transactionIdbigintUnique identifier of the provider's winning transaction
sessionIdstringoptional*Unique game session identifier in the partner's system
hashstringSignature (sha256 from encryption string)
finishedbooleanoptionalFlag indicating whether the round is finished

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

isFreespinWinbooleanoptionalFlag indicating if 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

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

Response ​

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

Example ​

Request ​

js
{  
    amount: '20.00',  
    currency: 'USD',  
    partnerId: 1,  
    playerId: '432',  
    gameId: 3,  
    roundId: 7665,  
    betTransactionId: 1333882827,  
    transactionId: 36,  
    sessionId: '123',  
    finished: true,  
    hash: 'd919a11d4cb1b0dc4cc0d5f880c6970fd160d434b3a779a66a9a7f6451d108fd'  
}

Response ​

js
{  
    status: 'success'  
    data: {  
        balance: '10123.63',   
        transactionId: '1333882829'  
    }  
}

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