Payload Structure
Every event contains adata object with the transaction snapshot at the moment of the event. The payload structure is the same for all event types, but field values differ depending on the transaction type and lifecycle stage.
Amount Fields Explained
There are four amount-related fields and they serve different purposes depending on the transaction type.Withdrawal (Buy)
If the integrator passes
includeFeeInAmount: true, the calculation is reversed: expectedAmount = original amount, requestedAmount = original amount - networkFee. The relationship is always: expectedAmount = requestedAmount + networkFee.
usdtTotal is calculated as: convert expectedAmount to USDT at preview rate, then add 1.25% hold buffer. This is the total USDT deducted from the merchant’s balance. After conversion, excess hold is returned.
Example:
Acquiring (Sale)
For acquiring,
requestedAmount and expectedAmount are always identical. The amount field shows the actual total received. By comparing amount to expectedAmount, the system determines the transaction status: Paid (equal), Overpaid (more), Underpaid (less).
Example:
Status Values
Currency Logic
Thecurrency field represents what was expected, not what was actually received:
- Withdrawal: the target cryptocurrency being purchased (e.g.
"TRX","BTC") - Acquiring: the expected deposit cryptocurrency from the order configuration (e.g.
"BTC")
receivedCurrency (see below).
Received Fields (receivedCurrency, receivedNetwork, receivedAmount)
These three fields represent what was actually deposited on the blockchain for a specific deposit. They are only populated on the deposit_received event and always null for all other events.
receivedAmountcontains the individual deposit value from the specific webhook, NOT the cumulative total (useamountfor cumulative)receivedCurrencyis the cryptocurrency ticker of this specific depositreceivedNetworkis the blockchain network of the deposit
Per-Event Field Details
Withdrawal Events
Acquiring Events
Notes:
deposit_receivedis always emitted together with one of:completed,overpaid,underpaid, orcurrency_mismatchdeclinedmay or may not have deposit data depending on whether any deposits were received before the decline- Acquiring amounts are cumulative across multiple deposits (each
was_final_exchangewebhook adds to the total) - For
currency_mismatch,currencyshows what was expected andreceivedCurrencyshows what was actually sent