Blockchain Callbacks

StraitsX sends callbacks to your registered URL when blockchain/stablecoin transactions change status. These events cover on-chain movements of XSGD and XUSD tokens.

When these callbacks fire

This page covers the following events:

EventDescription
stablecoinWithdrawalStatusUpdatedA withdrawal (sending tokens from your StraitsX account to an external address) is submitted or confirmed on-chain.
stablecoinDepositStatusUpdatedA deposit (receiving tokens from an external address into your StraitsX account) is detected or confirmed on-chain.

Status values

Both events share the same status values:

StatusMeaning
pendingTransaction submitted/detected, awaiting on-chain confirmation
completedTransaction confirmed on-chain
failedTransaction could not be processed

Supported networks and tokens

TokenNetworks
XSGDEthereum, Polygon, Avalanche, Arbitrum, Hedera, Ripple, Zilliqa, Solana
XUSDEthereum, Bnbsmart (BSC), Solana


Payload structure

Both events share the same payload structure. The only differences are:

FieldWithdrawalDeposit
data.typestablecoin_withdraw_contractstablecoin_deposit_contract
blocked_reasonsNot presentPresent (array)
transaction_hash when pendingMay be pending (not yet broadcast)Always the actual hash (already detected on-chain)
{
  "data": {
    "attributes": {
      "amount": "1.0",
      "blockchain": "XSGD_ERC20",
      "created_at": "2026-01-23T11:07:45.693Z",
      "idempotency_id": "e8b7c6d5a4f3e2d1c0b9a8f7e6d5c4b3",
      "network": "Ethereum",
      "network_fees": "0.0",
      "status": "completed",
      "token": "xsgd",
      "total_amount": "1.0",
      "transaction_hash": "0x7f3e8b2a1c9d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e",
      "transaction_source": "0x1234567890abcdef1234567890abcdef12345678"
    },
    "id": "contract_0d151e28146d42aabf9115ee3f6c6926",
    "type": "stablecoin_deposit_contract"
  }
}
{
  "data": {
    "attributes": {
      "amount": "2.0",
      "blockchain": "XSGD_MATIC",
      "created_at": "2024-06-11T04:48:39.912Z",
      "idempotency_id": "testing",
      "network": "Polygon",
      "network_fees": "0.02",
      "status": "completed",
      "token": "xsgd",
      "total_amount": "2.02",
      "transaction_hash": "0x658043f80b1684cce02a0f4c0ed5449589eef495492bae5a849e47e80c46dd4d",
      "transaction_source": "0x4fd0f684dcf7c6c862114db8cebfe8bf6bb175c3"
    },
    "id": "contract_7afa75105cad43579f9589ebe30b6784",
    "type": "stablecoin_withdraw_contract"
  }
}

Field reference

FieldScopeTypeDescription
data.idCommon fieldsStringUnique contract ID.
data.typeCommon fieldsStringstablecoin_withdraw_contract or stablecoin_deposit_contract
data.attributes.transaction_hashCommon fieldsStringBlockchain transaction hash. For withdrawals, may be pending if not yet broadcast.
data.attributes.amountCommon fieldsStringToken amount (sent for withdrawals, received for deposits).
data.attributes.network_feesCommon fieldsStringNetwork/gas fees. Typically "0.0" for deposits (sender pays gas).
data.attributes.total_amountCommon fieldsStringTotal amount.
For withdrawals: amount + network fees deducted.
For deposits: amount credited.
data.attributes.transaction_sourceCommon fieldsStringFor deposits: the sender's blockchain address. For withdrawals: the destination blockchain address (where tokens are sent to).
data.attributes.statusCommon fieldsStringContract status.
data.attributes.idempotency_idCommon fieldsStringYour idempotency key (withdrawals) or external reference ID (deposits).
data.attributes.networkCommon fieldsStringBlockchain network name.
data.attributes.tokenCommon fieldsStringToken/currency.
data.attributes.blockchainCommon fieldsStringToken standard identifier (e.g., XSGD_ERC20, XSGD_AVAX, XUSD_SPL).
data.attributes.created_atCommon fieldsStringISO 8601 timestamp.
data.attributes.blocked_reasonsDeposit onlyArray of objectsCompliance reasons the deposit is held for review. Each object contains a code field. Empty array if not blocked. Example: [{"code": "travel_rule_check"}]

blockchain value reference

TokenNetworkblockchain value
XSGDEthereumXSGD_ERC20
XSGDPolygonXSGD_MATIC
XSGDAvalancheXSGD_AVAX
XSGDArbitrumXSGD_ARB
XSGDHederaXSGD_HTS
XSGDRippleXSGD_XRP
XSGDZilliqaXSGD_ZRC2
XSGDSolanaXSGD_SPL
XUSDEthereumXUSD_ERC20
XUSDBNB Smart ChainXUSD_BEP20
XUSDSolanaXUSD_SPL

Did this page help you?