Wallet webhooks

The aggregator calls five wallet operations on the client’s wallet base URL, each signed like a client request.

POST/balance

Balance

Reads the player’s balance in the session currency; it is never journalled and never retried.

POST/bet

Bet

Debits the amount within the bet deadline of 3 seconds; an unknown outcome is compensated with a rollback that refers to the bet.

POST/win

Win

Credits the amount, possibly zero; an unknown outcome is resent with the same transaction_id until acknowledged.

POST/rollback

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.

POST/round-finished

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.

Was this page helpful?