Wallet, on your server
wallet.win
Pays a win.
Who calls it
We → you
POST {your server}/v1/wallet.winWe send it when a round ends with a win. 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
| Field | Type | What it is |
|---|---|---|
transactionId | string | The same call again moves no money. |
roundId | string | Links the stake to its win, loss or refund. Store your own round with it. |
sessionId | string | Links the money to our session. |
casinoSessionId | string | Links the money to your own session. |
playerId | string | Whose balance. |
amount | integer | The whole win. 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. |
currency | string | Which money. |
traceId | string | One search finds the whole chain on both sides. |
baseWin | integer | What the paid spin won by itself. win = baseWin + freeSpins.win. |
freeSpins | object, optional | Only if the round triggered free spins: { "count": 10, "win": 420 }. How many free spins, and what they won in all. See Free spins. |
Answer
| Field | Type | What it is |
|---|---|---|
balance | integer | The new balance. |
If you do not answer
- We send the same wallet.win again with the same transactionId, until you accept it.
- After 1 hour it goes on the stuck list. See Retries.
- A repeated answer can carry an old balance. The game calls wallet.balance for a fresh one.
Rules your wallet must follow
See the rules on wallet.stake. Rule 3 matters most here: a win is always accepted.
Errors
- You must accept it. Always, even after the session closed, the player was blocked, or during maintenance.
duplicate_mismatch: the item goes on the stuck list. No retry.already_endedoralready_refunded: a bug on our side. The item goes on the stuck list.
Example
Request
{
"transactionId": "t-01JC91…",
"roundId": "r-01JC90…",
"sessionId": "s-01JC8Z…",
"casinoSessionId": "c-5531",
"playerId": "p-82731",
"amount": 500,
"currency": "EUR",
"baseWin": 80,
"freeSpins": { "count": 10, "win": 420 },
"traceId": "tr-01JC…"
}
Answer
{ "ok": true, "result": { "balance": 25400 } }