Skip to main content

Payload Structure

Every event contains a data 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.
{
  id: "uuid",                          // Transaction ID
  externalId: "string",                // Integrator's external order identifier
  type: "Buy" | "Sale",                // "Buy" = withdrawal, "Sale" = acquiring
  status: "TransactionStatus",         // Current status

  // Currency & pair
  pair: "string",                      // Trading pair: "USDT/TRX" (withdrawal) or "BTC/USDT" (acquiring)
  currency: "string",                  // Target currency
  network: "string",                   // Blockchain network: "TRC20", "ERC20", "Bitcoin", etc.

  // Amounts (see "Amount Fields Explained" section below)
  requestedAmount: "string",           // Net amount user receives (withdrawal) or expects to deposit (acquiring)
  expectedAmount: "string",            // Total incl. network fee (withdrawal) or same as requestedAmount (acquiring)
  amount: "string | null",             // Cumulative actual amount. null until processed.
  usdtTotal: "string | null",          // USDT reserved with hold (withdrawal) or cumulative USDT credited (acquiring)
  exchangeRate: "string | null",       // Preview rate at creation, actual rate after conversion
  dealFee: "string | null",            // Commission/fee charged on the transaction

  // Received deposit info (acquiring `deposit_received` event only)
  receivedCurrency: "string | null",   // Actual deposited cryptocurrency (this deposit)
  receivedNetwork: "string | null",    // Network of the received deposit
  receivedAmount: "string | null",     // Individual deposit amount in receivedCurrency (NOT cumulative)

  // Blockchain
  address: "string",                   // Destination (withdrawal) or deposit address (acquiring)
  hash: "string | null",               // Blockchain transaction hash, empty string until available
  memo: "string | null",               // Memo/tag for networks that require it (XRP, XLM, etc.)

  // Metadata
  merchantId: "uuid",                  // Merchant identifier
  cancelReason: "string | null",       // Reason for cancellation (only on failure/cancel events)
  createdAt: "ISO 8601",               // Transaction creation time
  updatedAt: "ISO 8601",               // Last update time
  completedAt: "ISO 8601 | null"       // Completion time, null until finalized
}

Amount Fields Explained

There are four amount-related fields and they serve different purposes depending on the transaction type.

Withdrawal (Buy)

FieldMeaningExample
requestedAmountNet amount the user will receive on blockchain"25" TRX
expectedAmountTotal amount including network fee: requestedAmount + networkFee"25.5" TRX
amountActual amount sent (reported after blockchain send)"25" TRX
usdtTotalUSDT reserved from balance including 1.25% hold buffer"7.52" USDT
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:
You requests: withdraw 25 TRX
  requestedAmount = "25"       ← what the user receives
  expectedAmount  = "25.5"     ← 25 + 0.5 network fee
  exchangeRate    = "0.2971"   ← preview USDT/TRX rate
  usdtTotal       = "7.68"    ← (25.5 × 0.2971) × 1.0125 hold buffer

After blockchain send:
  amount          = "25"       ← actual sent

Acquiring (Sale)

FieldMeaningExample
requestedAmountAmount the integrator expects to receive as deposit"0.001" BTC
expectedAmountSame as requestedAmount"0.001" BTC
amountCumulative actual deposit total across all partial deposits"0.0012" BTC
receivedAmountIndividual deposit amount in receivedCurrency (only on deposit_received)"0.0005" BTC
usdtTotalCumulative USDT credited to the merchant’s balance (after fees)"45.30" USDT
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:
You creates order: deposit 0.001 BTC
  requestedAmount = "0.001"    ← expected deposit
  expectedAmount  = "0.001"    ← same value
  amount          = null       ← no deposit yet
  usdtTotal       = null

After deposit confirmed:
  amount          = "0.0012"   ← actual received (overpaid)
  usdtTotal       = "45.30"   ← USDT credited after fees
  exchangeRate    = "37750"    ← BTC/USDT rate used
  status          = "Overpaid"
Summary
FieldWithdrawalAcquiring
requestedAmountNet amount to receive (excl. fee)Expected deposit amount
expectedAmountGross amount (incl. network fee)Same as requestedAmount
amountSent amountCumulative actual deposits
usdtTotalUSDT reserved (with 1.25% hold)Cumulative USDT credited

Status Values

StatusUsed inDescription
QueuedWithdrawalQueued for processing
NewAcquiringOrder created, awaiting deposit
WaitingAcquiringBlockchain confirmation in progress
PaidAcquiringDeposit matches expected amount
OverpaidAcquiringDeposit exceeds expected amount
UnderpaidAcquiringDeposit less than expected amount
CanceledBothTransaction canceled / declined / failed
CurrencyMismatchAcquiringWrong cryptocurrency was deposited
CanceledButPaidAcquiringOrder expired/declined but exact deposit was received
CanceledButOverpaidAcquiringOrder expired/declined but overpayment was received
CanceledButUnderpaidAcquiringOrder expired/declined but underpayment was received

Currency Logic

The currency 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")
The actually received cryptocurrency is reported in 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.
  • receivedAmount contains the individual deposit value from the specific webhook, NOT the cumulative total (use amount for cumulative)
  • receivedCurrency is the cryptocurrency ticker of this specific deposit
  • receivedNetwork is the blockchain network of the deposit
ScenarioreceivedCurrencyreceivedNetworkreceivedAmount
Withdrawal (any event)nullnullnull
Acquiring — deposit_receivedactual crypto tickerdeposit networkindividual deposit amount
Acquiring — all other eventsnullnullnull

Per-Event Field Details

Withdrawal Events

Fieldcreatedcompleteddeclinedfailedcanceled
statusQueuedfinal statusCanceledCanceledCanceled
amountnullfinal amountfrom DBfrom DBfrom DB
hash""blockchain hashhashmay be ""may be ""
usdtTotalreserve amountfinal valuefrom DBfrom DBfrom DB
exchangeRatepreview rateactual ratefrom DBfrom DBfrom DB
dealFee"0"calculatedfrom DBfrom DBfrom DB
cancelReasonnullnullreasonerror messagerollback reason
completedAtnulltimestampnullnullnull
received*nullnullnullnullnull

Acquiring Events

Fieldcreatedconfirmation_starteddeposit_receivedcompleted / overpaid / underpaid / currency_mismatchdeclinedcanceled
statusNewWaitingvariesvariesvariesCanceled
currencyexpected cryptoexpected cryptoexpected cryptoexpected cryptoexpected cryptoexpected crypto
receivedCurrencynullnullactual cryptonullnullnull
receivedNetworknullnulldeposit networknullnullnull
receivedAmountnullnullindividual deposit amountnullnullnull
amountnullnullcumulativecumulativecumulative or nullnull
hash""blockchain hashhashhashhash""
usdtTotalnullnullcumulative USDTcumulative USDTcumulative or nullnull
exchangeRatenullnullweighted avgweighted avgfrom DBnull
dealFeenullnullcalculatedcalculatedfrom DBnull
completedAtnullnullif availableif availableif availablenull
cancelReasonnullnullnullnullnullnull
Notes:
  • deposit_received is always emitted together with one of: completed, overpaid, underpaid, or currency_mismatch
  • declined may 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_exchange webhook adds to the total)
  • For currency_mismatch, currency shows what was expected and receivedCurrency shows what was actually sent