rollback
{wallet_url}
Undo the movement named in reference_transaction_id: return a bet, take back a win. Rollbacks may arrive after the session closed.
{
"action": "rollback",
"transaction_id": "pragmatic:5501934:rollback",
"reference_transaction_id": "pragmatic:5501934",
"session_id": "2222aaaa-…",
"round_id": "7200311",
"player_id": "p-1",
"game_id": "vs20fruitsw",
"currency": "EUR",
"amount": "1.50"
}{ "balance": "100.00", "transaction_id": "op-4473" }| Case | Answer | Resulting balance |
|---|---|---|
| The bet was debited | 200 with the new balance | balance + bet |
| Same rollback again | 200 with the first answer | unchanged |
| A win you credited | 200 with the new balance: take the win back | balance − win |
| You never saw the movement | 200 with the current balance; remember the id as cancelled | unchanged |
| That movement arrives after its rollback | 4xx: refuse it | unchanged |
Two kinds reach you. A provider cancelling a movement your wallet settled: reference_transaction_id names the bet or, now and then, the win being cancelled; undo whichever it is. A provider rollback of a bet that never settled with you (refused, failed or never sent) does not reach you as a rollback: we settle it ourselves and ask your wallet for the balance with a getbalance.
Our own rollback after your wallet stayed silent on a bet or a win. It carries "<transaction_id>:rollback" as its id and the silent movement as reference_transaction_id, so it may name a movement that never reached you. Its amount is the silent movement's, written in the currency's precision ("1.50"), and a movement of a free-spin series keeps its free_spins_id. For a silent win, it undoes the credit: take the amount back if you credited it.
