Webhook Endpoints
Deposit
Credit player balance for wins
POST {api_base_url}/deposit
Called when a bet is settled. Credits the player's balance with their winnings.
For games where many bets close simultaneously (Keno, Bingo, Crash), consider implementing Batch Deposit to reduce HTTP overhead.
Request
{
"player_id": "player_123",
"amount": 15000,
"game": "aviator",
"instance_id": "inst_abc",
"action": {
"type": "BET",
"round_id": "round_456",
"wager": 5000,
"won": 15000
},
"action_id": "bet_789",
"tx_id": "deposit:bet:bet_789"
}| Field | Type | Description |
|---|---|---|
player_id | string | Player to credit |
amount | integer | Amount to credit in cents |
game | string | Game identifier |
instance_id | string | Game instance identifier |
action | object | Details about the bet outcome (see below) |
action_id | string | Same bet identifier from the original withdraw |
tx_id | string | Transaction ID, format: deposit:bet:{action_id} |
Action Types
BET - most common, crediting winnings from a bet:
| Field | Type | Description |
|---|---|---|
type | string | "BET" |
round_id | string | Game round identifier |
wager | integer | Original wager in cents |
won | integer | Amount won in cents |
FREE_BET_CLAIM - crediting free bet winnings:
| Field | Type | Description |
|---|---|---|
type | string | "FREE_BET_CLAIM" |
bets | array | List of {id, round_id, wager, won} items |
JACKPOT - crediting jackpot winnings:
| Field | Type | Description |
|---|---|---|
type | string | "JACKPOT" |
jackpot_id | string | Jackpot identifier |
Response
{"type": "SUCCESS", "balance": 1150.00, "timestamp": 1712401234567}Always return HTTP 200.
When amount is 0
A deposit with amount: 0 means the player lost the bet. You should still process it successfully - the bet is settled, just with no winnings. Return SUCCESS with the current balance.
Idempotency
Same as withdraw: if you've already processed this tx_id, return SUCCESS with the current balance. Do not credit again.