PENDING the moment OpenFX observes incoming funds (a stablecoin transfer to your address, a wire from your customer’s bank) and transitions to COMPLETED once those funds are cleared and credited to your balance, or ERROR if they don’t clear.
You don’t initiate a deposit — funds arrive via your customer’s wire or
on-chain transfer, and you find out about them after the fact. That makes
detection a notification problem. Webhooks (
type: "deposits", eventType: "deposit.completed", with a top-level data object) are the primary channel
because they fire the instant funds become spendable; polling GET /v3/fx/deposits with cursor pagination is the fallback when webhooks miss or
your handler is down.State machine
Status values are summarized in the Status enums reference.State semantics
How OpenFX detects deposits
You don’t initiate a deposit through the API; funds arrive via your customer’s wire or on-chain transfer to addresses configured on your account. You observe deposits via
GET /v3/fx/deposits (or GET /v3/fx/deposits/{id} to fetch a single deposit) or the Deposits webhook. Webhook payloads share the API’s convention — type: "deposits" (the resource), the dotted eventType (e.g. deposit.completed), a top-level data object holding the Deposit, camelCase keys, and string amounts; see Webhook authentication for the envelope.
Listing recent deposits
startingAfter / endingBefore); see Pagination. To reconcile incremental new deposits since your last check, use endingBefore with the most recent ID you’ve processed.
Field reference
id: permanent deposit ID (readable,dpt_-prefixed)depositAmount,currency: what was depositednetwork: settlement network (e.g.ETHEREUMfor a stablecoin deposit,FIATfor a bank-rail deposit)transactionHash: on-chain transaction hash for crypto deposits,nullotherwisereferenceId: external reference id supplied by the customer, if anycomments,memo: free-text notes and an optional memo line captured at deposit timepaymentDetails: rail-specific reference data for fiat deposits (e.g. FEDWIREimad/omad), keyed by transfer type;nullfor crypto deposits or without rail metadatacreatedAt: when OpenFX first observed the deposit
Common mistakes
- Ignoring
networkfor stablecoin reconciliation. A USDC deposit on Ethereum and a USDC deposit on Polygon are bothUSDCbut different on-chain rails — readnetworkto tell them apart. - Reaching for
transactionHashon a fiat deposit. It’snullfor fiat — match fiat deposits onreferenceIdandpaymentDetailsinstead. - Assuming
statushas more than three values. Deposit’sstatusis a closed enum:PENDING,COMPLETED,ERROR.
What’s next
Trade Settlement
How deposits flow into balances and out as withdrawals.
Withdrawal lifecycle
The companion state machine.
Pagination
Cursor-based reconciliation patterns.