Phoenix Games
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"
}
FieldTypeDescription
player_idstringPlayer to credit
amountintegerAmount to credit in cents
gamestringGame identifier
instance_idstringGame instance identifier
actionobjectDetails about the bet outcome (see below)
action_idstringSame bet identifier from the original withdraw
tx_idstringTransaction ID, format: deposit:bet:{action_id}

Action Types

BET - most common, crediting winnings from a bet:

FieldTypeDescription
typestring"BET"
round_idstringGame round identifier
wagerintegerOriginal wager in cents
wonintegerAmount won in cents

FREE_BET_CLAIM - crediting free bet winnings:

FieldTypeDescription
typestring"FREE_BET_CLAIM"
betsarrayList of {id, round_id, wager, won} items

JACKPOT - crediting jackpot winnings:

FieldTypeDescription
typestring"JACKPOT"
jackpot_idstringJackpot 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.