Menu

Wallet, on your server

wallet.stake

Takes the bet when a round starts.

Who calls it

We → youPOST {your server}/v1/wallet.stake

We send it when a round starts. We sign the call with our private key. Check it with our public key for the environment. See Signing calls. You answer within 5 seconds.

Request

FieldTypeWhat it is
transactionIdstringThe same call again moves no money.
roundIdstringLinks the stake to its win, loss or refund. Store your own round with it.
sessionIdstringLinks the money to our session.
casinoSessionIdstringLinks the money to your own session.
playerIdstringWhose balance.
gameIdstringYour own round record and reports per game.
amountintegerThe bet. A whole number in the currency’s smallest unit: 100 EUR is 1.00 EUR. The decimals follow the ISO 4217 list. Social coins use the decimals set in the environment.
currencystringWhich money.
traceIdstringOne search finds the whole chain on both sides.

Answer

FieldTypeWhat it is
balanceintegerThe new balance.

Or refuse the stake with one code from the table below.

If you do not answer

Rules your wallet must follow

The wallet test run checks each rule.

  1. The same transactionId again gets the same answer and moves no money.
  2. The same transactionId with any other field different is refused with duplicate_mismatch. It shows a bug on one side, instead of hiding it.
  3. wallet.win, wallet.loss and wallet.refund are always accepted, even after the session closed, the player was blocked, or during maintenance. The bet is already taken. The round must end.
  4. A refund for a wallet.stake you never received is accepted, moves no money, and answers "applied": false.
  5. You remember that refund. If the wallet.stake arrives late, you refuse it with already_refunded.
  6. You handle a wallet.stake and its refund one after the other, never at the same time.
  7. A wallet.stake ends with one win, one loss or one refund, never two. You refuse the second with already_ended or already_refunded.
  8. You keep every transactionId as long as we might still send it: at least 90 days, and longer for any item still on the stuck list.

Errors

CodeWhat the player sees
insufficient_fundsNot enough balance.
session_closedYour session ended.
player_blockedYou can’t play right now.
limit_reachedYou reached a limit set by the casino.
maintenanceThe casino is under maintenance.

Three more codes are not for the player:

Example

POST {your server}/v1/wallet.stakeExample
Request
{
  "transactionId": "t-01JC90…",
  "roundId": "r-01JC90…",
  "sessionId": "s-01JC8Z…",
  "casinoSessionId": "c-5531",
  "playerId": "p-82731",
  "gameId": "mines",
  "amount": 100,
  "currency": "EUR",
  "traceId": "tr-01JC…"
}

Answer
{ "ok": true, "result": { "balance": 24900 } }