Event Types
1. DEPOSIT
Sent when a user's deposit is confirmed on-chain and funds have been swept to the bankroll.
Delivery: Fire-and-forget. Failures are logged but do not affect deposit processing.
Payload fields:
| Field | Type | Description |
|---|---|---|
event | string | DEPOSIT |
depositId | number | Internal deposit ID |
idempotencyKey | string | UUID for deduplication |
externalUserId | string | The user identifier you provided when creating the deposit ticket |
amount | string | Net raw amount that reached the bankroll (gross − fee), token's smallest unit |
amountInDollar | string | null | Net USD value — credit this to the user |
grossAmount | string | Raw amount the user actually sent on-chain |
feeAmount | string | Raw fee deducted on settlement ("0" when no fee) |
feeInDollar | string | null | USD value of the fee ("0.000000" when no fee) |
type | string | ERC20 or NATIVE |
contractAddress | string | null | Token contract address (null for native transfers) |
transactionHash | string | null | Inbound (deposit) transaction hash |
chainId | number | Chain ID where the deposit occurred |
confirmedAt | string | ISO 8601 timestamp |
Amounts: amount / amountInDollar are the net credited to you (fee already deducted). Reconciles as amount + feeAmount = grossAmount. With no fee configured, feeAmount = "0" and grossAmount = amount. Credit amountInDollar, not the raw amount.
Expected response:
{
"error": 0,
"description": "ok",
"transactionId": "your-internal-id"
}Idempotency: Use idempotencyKey to deduplicate. You may receive the same deposit event more than once.
2. WITHDRAW_REQUEST
Sent before a withdrawal is processed, requesting your approval. The withdrawal will only proceed if you return error: 0.
Delivery: Synchronous. The system waits for your response before continuing.
Payload fields:
| Field | Type | Description |
|---|---|---|
event | string | WITHDRAW_REQUEST |
withdrawRequestId | string | Withdraw request UUID (may be empty for initial requests) |
externalUserId | string | The user identifier |
type | string | DIRECT_TRANSFER or OFF_RAMP |
address | string | Destination wallet address |
cryptoCurrencyCode | string | e.g. USDT, ETH |
fiatCurrencyCode | string | e.g. USD, EUR |
fiatAmount | string | Fiat amount of the withdrawal |
cryptoAmount | string | null | Crypto amount (if specified by the user) |
amountInUsd | string | null | USD value — check this against the user's balance |
requestedAt | string | ISO 8601 timestamp |
To approve - return:
{
"error": 0,
"description": "ok"
}To deny - return a non-zero error code:
{
"error": 5,
"description": "Daily withdrawal limit exceeded"
}Error codes:
| Code | Message Shown to User |
|---|---|
0 | (approved) |
1 | Withdrawal request declined by operator |
2 | Insufficient balance for withdrawal |
3 | Withdrawal temporarily unavailable |
4 | User is not eligible for withdrawal |
5 | Daily withdrawal limit exceeded |
6 | Withdrawal amount too low |
7 | Withdrawal amount too high |
8 | Account verification required |
9 | Withdrawal suspended for this account |
Any other non-zero code will show the description field from your response as the error message.
3. WITHDRAW_COMPLETE
Sent after a withdrawal has been completed (status changed to COMPLETED by an admin).
Delivery: Fire-and-forget. Failures are logged but do not affect the withdrawal status.
Payload fields:
| Field | Type | Description |
|---|---|---|
event | string | WITHDRAW_COMPLETE |
withdrawRequestId | string | Withdraw request UUID |
externalUserId | string | The user identifier |
type | string | DIRECT_TRANSFER or OFF_RAMP |
status | string | COMPLETED |
address | string | Destination wallet address |
cryptoCurrencyCode | string | e.g. USDT, ETH |
fiatCurrencyCode | string | e.g. USD, EUR |
fiatAmount | string | null | Fiat amount |
cryptoAmount | string | null | Crypto amount |
amountInUsd | string | null | USD value of the withdrawal |
completedAt | string | ISO 8601 timestamp |
Expected response:
{
"error": 0,
"description": "ok"
}