Debit
Take the stakes of one or more bets, or one Blackjack extra stake, from the player’s balance in one atomic change.
amount or nothing. A declined debit stays declined under its ID, even if funds arrive later. See Debits for the rules your implementation keeps.Headers
Equals the body's id.
"batch_3a787ce18225e69054f0bfbe34e909d7"
When the game server signed this attempt, in Unix milliseconds. Refuse a call whose timestamp is more than 60 seconds from your clock. A retry carries a fresh timestamp.
^[0-9]{13}$"1793629805120"
Lowercase hex HMAC-SHA256, keyed with your WALLET_SECRET, over the exact UTF-8 bytes of timestamp + "." + body. Compare it in constant time before you parse the body, and refuse the call with a status other than 200 when it does not match.
^[0-9a-f]{64}$"0315897c76ddcf819b7603a809501ff9ef1dd518187448e6d41597b6d4b7a021"
Body
The idempotency ID. batch_ for bets, stake_ for a Blackjack double, split or insurance.
^(batch|stake)_[0-9a-f]{32}$Your stable player ID, the sub of the session token.
^[A-Za-z0-9_-]{1,128}$"player_48213"
The currency code. Each currency is a separate account of the player.
^[A-Z0-9]{2,12}$"USD"
A canonical non-negative integer string in the currency's minor units. No decimals, signs or leading zeros.
^(0|[1-9][0-9]{0,18})$"9900"
"debit"The bets this debit pays for. Their stakes add up to amount. A batch holds up to 1,000 bets.
1A bet ID, chosen by the player's browser. The element uses 32 lowercase hex characters.
^[A-Za-z0-9_-]{16,80}$Response
The debit is applied, or durably declined.
The request's id.
declined only for a debit the player cannot cover. Credits and balance reads are always applied.
applied, declined The player's balance after this operation, in minor units.
^(0|[1-9][0-9]{0,18})$"9900"
Your wallet-wide revision after this operation. It increases with every change to the account, including changes outside kinematic. Two different balances never share a revision.
^(0|[1-9][0-9]{0,18})$"9900"
The request's currency.
^[A-Z0-9]{2,12}$"USD"