Skip to Content

Cancel

Called to roll back a previously processed transaction. The wallet must reverse the transaction identified by aborted_transaction_id and return the resulting balance.

Request

[POST] {WALLET_URL}/
ParameterTypeRequiredDescription
actionstringyesalways cancel
user_idintegeryesuser’s ID at the casino
currencystring(3)yescurrency code in ISO 4217 format
amountfloatnoamount of the cancelled transaction, in the major currency unit. Informational, and absent for some game providers — reverse what you booked for aborted_transaction_id, not this value
game_idintegeryesunique game id
transaction_idstring(32)yesunique id of this cancel transaction
round_idstring(32)noid of the game round the cancelled transaction belongs to
aborted_transaction_idstring(32)yestransaction_id of the bet or win being rolled back
aborted_actionstringnobet or win — type of the transaction being rolled back, when known

Request body:

{ "user_id": 10000, "action": "cancel", "amount": 0.25, "currency": "USD", "game_id": 19773, "transaction_id": "9c1d0a77b1f34e5fa0c9d2e8b7461a35", "round_id": "f85eb4d5a67940f7b4ab06958be5a908", "aborted_transaction_id": "2412fb89e9e94b28b0f35d28cd818202" }

transaction_id and aborted_transaction_id are different values: transaction_id identifies the cancel itself, aborted_transaction_id points to the original transaction. If the referenced transaction is unknown, respond with error 1008.

A cancelled bet is credited back, a cancelled win is debited — even if that takes the balance below zero. The win may already have been spent, and the rollback is not sent again once you have answered it, so refusing it leaves the two ledgers permanently apart. Book it, answer OK and return the resulting balance; your negative-balance policy applies afterwards, not to the callback. See Cancel semantics.

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 rollback
currencystring(3)yescurrency code in ISO 4217 format
Last updated on