Wallet, on your server
wallet.refund
Gives a bet back when a stake had no answer.
Who calls it
We → you
POST {your server}/v1/wallet.refundWe send it when your answer to a wallet.stake was unknown. No money is lost in a timeout. 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. |
stakeTransactionId | string | Which stake to give back. |
amount | integer | The bet to give back. 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. |
Answer
| Field | Type | What it is |
|---|---|---|
balance | integer | The new balance. |
applied | boolean | false when you never got the wallet.stake. Support sees whether money was ever taken. |
If you do not answer
- We send the same wallet.refund again with the same transactionId, until you accept it.
- After 1 hour it goes on the stuck list. See Retries.
A refund that comes first
- A refund can reach you before its wallet.stake. Record it, move no money, and answer "applied": false.
- If the wallet.stake arrives later, refuse it with already_refunded.
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-01JC94…",
"roundId": "r-01JC95…",
"sessionId": "s-01JC8Z…",
"casinoSessionId": "c-5531",
"playerId": "p-82731",
"stakeTransactionId": "t-01JC96…",
"amount": 100,
"currency": "EUR",
"traceId": "tr-01JC…"
}
Answer
{ "ok": true, "result": { "balance": 25000, "applied": false } }