Skip to Content

Bet

Called when the player places a bet. The wallet must debit amount from the player’s balance and return the new balance.

Request

[POST] {WALLET_URL}/
ParameterTypeRequiredDescription
actionstringyesalways bet
user_idintegeryesuser’s ID at the casino
currencystring(3)yescurrency code in ISO 4217 format
amountfloatyesamount to debit, in the major currency unit
game_idintegeryesunique game id
transaction_idstring(32)yesunique transaction id, use it to reject duplicates
round_idstring(32)yesid of the game round the bet belongs to
ext_round_idstring(32)nogame provider’s own round id, when it differs from round_id
ext_round_finishedintegerno1 when this bet closes the round, see Round completion
freespins_idstringnothe Gift Spin id, when the bet is part of a gift spin session
freespins_finishedstringnoset when this bet is the last one of the gift spin session

Request body:

{ "user_id": 10000, "action": "bet", "amount": 0.25, "currency": "USD", "game_id": 19773, "transaction_id": "2412fb89e9e94b28b0f35d28cd818202", "round_id": "f85eb4d5a67940f7b4ab06958be5a908", "ext_round_id": "f85eb4d5a67940f7b4ab06958be5a908" }

transaction_id is unique per transaction. If the same transaction_id arrives twice, treat it as a duplicate and do not debit the player again — see error 1007.

Response

Response should be a json object.

{ "status": "OK", "balance": 100.05, "currency": "USD" }
ParameterTypeRequiredDescription
statusstringyesOK on success, ERROR otherwise
balancefloatyesplayer’s balance after the bet
currencystring(3)yescurrency code in ISO 4217 format

If the player cannot cover the bet, respond with error 1006 instead of a success payload.

Last updated on