Wallet webhooks
The aggregator calls five wallet operations on the client’s wallet base URL, each signed like a client request.
Balance
Reads the player’s balance in the session currency; it is never journalled and never retried.
Bet
Debits the amount within the bet deadline of 3 seconds; an unknown outcome is compensated with a rollback that refers to the bet.
Win
Credits the amount, possibly zero; an unknown outcome is resent with the same transaction_id until acknowledged.
Rollback
Reverses the transaction named by refers_to_transaction_id: a bet’s stake is credited back and a win’s credit is taken back.
For the sportsbook, a rollback of a win (cancel_credit) can make the balance less than zero. Do not refuse it with INSUFFICIENT_FUNDS or PLAYER_LIMIT_REACHED; see Sportsbook.
Round finished
Tells the client a round is closed; it carries no amount and is resent with the same transaction_id until acknowledged.
Sportsbook
The sportsbook uses the same five webhooks. Sportsbook shows how each sportsbook operation becomes a bet, a win or a rollback, and why a win or a rollback can come after round-finished.