Skip to content

Refund of the bet to the player ​

Overview ​

Request typeURL
POST<server-partner>/refund

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

String to hash

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

Response ​

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

Example ​

Request ​

js
{
    amount: '10.00',
    currency: 'USD',
    partnerId: 1,
    playerId: '432',
    gameId: 3,
    roundId: 7686,
    betTransactionId: 1333882828,
    transactionId: 37,
    sessionId: '123',
    finished: false,
    hash: '3d304f5134260424a0777a91745565cf3e8b80226d0e1aa66bb0835ffe59839a'
}

Response ​

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

Errors ​

Possible error messages:

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

In case of a BetNotFound error, the retry requests will not be sent.