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}/| Parameter | Type | Required | Description |
|---|---|---|---|
| action | string | yes | always cancel |
| user_id | integer | yes | user’s ID at the casino |
| currency | string(3) | yes | currency code in ISO 4217 format |
| amount | float | no | amount 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_id | integer | yes | unique game id |
| transaction_id | string(32) | yes | unique id of this cancel transaction |
| round_id | string(32) | no | id of the game round the cancelled transaction belongs to |
| aborted_transaction_id | string(32) | yes | transaction_id of the bet or win being rolled back |
| aborted_action | string | no | bet 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"
}| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | yes | OK on success, ERROR otherwise |
| balance | float | yes | player’s balance after the rollback |
| currency | string(3) | yes | currency code in ISO 4217 format |