Debit
Your wallet takes the stakes of bets.
Credit
Your wallet pays a payout or gives a stake back.
Balance
Your wallet answers a player’s balance.
Endpoints
The game server appends the endpoint’s name to your wallet URL, with or without a trailing slash:https://wallet.luckystar.example/kinematic and https://wallet.luckystar.example/kinematic/ both lead to https://wallet.luckystar.example/kinematic/debit. The URL must use https.
Request headers
Verify the signature over the raw body bytes, before you parse them, with a constant-time comparison. Refuse a timestamp more than 60 seconds from your clock.
Request body
Receipt
Answer every call you accept with HTTP200 and a JSON receipt of at most 16 KiB:
How the game server reads your answer
Every failure is ambiguous to the game server: it never assumes a call did not apply. It sends the same ID and body again after 1, 2, 4, 8 and 16 seconds, then every 30 seconds, with a new timestamp and signature each time, until a valid receipt arrives. Other jobs keep going in the meantime.
Limits and timing
- A debit batch covers up to 1,000 bets. Each credit covers one round.
- The game server reads a player’s balance at most once every 5 seconds, and again after you post a wallet event.
- Each call has 8 seconds to answer.
- The receipt is at most 16 KiB.