Webhook Endpoints
Deposit
Credit player balance for wins and free bet claims
POST {api_base_url}/deposit
Called to credit a player's balance — either due to a win or a free bet claim.
Request Fields
| Field | Type | Description |
|---|---|---|
player_id | string | Unique player ID |
amount | integer | Total amount being deposited |
game | string | Game ID |
instance_id | string | Game instance ID |
action | object | Type of deposit action |
action_id | string | ID to uniquely track this action |
tx_id | string | Unique transaction ID |
DepositAction Types
BET Action
Used when crediting winnings from a bet.
| Field | Type | Description |
|---|---|---|
type | string | "BET" - Action type identifier |
round_id | string | ID of the round |
wager | Amount object | Amount wagered |
won | Amount object | Amount won |
FREE_BET_CLAIM Action
Used when crediting free bet winnings.
| Field | Type | Description |
|---|---|---|
type | string | "FREE_BET_CLAIM" - Action type identifier |
bets | array of FreeBetItem | List of free bet results |
FreeBetItem Structure
| Field | Type | Description |
|---|---|---|
id | string | Free bet ID |
round_id | string | Round ID |
wager | Amount object | Wager placed |
won | Amount object | Amount won |
Important Notes
amountis always expressed in cents (i.e., the true value multiplied by 100)- Be sure to factor this into all calculations and comparisons when crediting amounts
- Check for idempotency by
tx_id- Always verify if the transaction has already been processed to avoid double crediting
Response Format
All webhook endpoints must return a response with a type field indicating success or error.
Success Response
{
"type": "SUCCESS",
"balance": 1234.56,
"timestamp": 1712401234567
}| Field | Type | Description |
|---|---|---|
type | string | Always "SUCCESS" for successful operations |
balance | float | Updated player balance after deposit |
timestamp | integer | Timestamp in milliseconds |
Error Response
{
"type": "ERROR",
"balance": 1234.56,
"code": "BET_NOT_FOUND"
}| Field | Type | Description |
|---|---|---|
type | string | Always "ERROR" for failed operations |
balance | float (optional) | Current player balance (if available) |
code | string | Error code explaining failure reason |
Common Error Codes
BET_NOT_FOUND- Referenced bet doesn't existBET_ALREADY_CLOSED- Bet is no longer accepting payoutsINVALID_REQUEST- Request format or data is invalid