Events and axes
Each axis has its own event. An event carries the axis, the previous state, the new state, and data specific to the new state.
A payment is done when you receive
flow.settlement.updated with newState set to completed. An execution event with source_confirmed means the payer’s funds arrived, but delivery to your destination can still be in progress. Payment lifecycle and states describes every state.
Event payload
Flow events share the envelope used by every Dynamic webhook, described in Admin and environment events. The flow-specific content is indata:
The payload describes the change, not the whole flow. To read the full flow, including
memo and the delivered amount, use your server’s API token to fetch it. The API guide shows the request.
What each event carries
Execution
The
source_confirmed event identifies the payer’s source transaction:
- Wallet.
txHashis the transaction the payer’s wallet sent. - Deposit address.
txHashis the deposit transaction as reported by the deposit provider. It isnullwhen the provider does not report one. - Exchange. The payer pays on the exchange, so there is no source transaction, and
txHashisnull.exchangeTransactionIdis the exchange’s ID for the payment.
txHash and the source chain are known, chainId and chainName identify the chain the source transaction was sent on, and blockExplorerUrls links to it on that chain’s explorer when one is configured. The full flow returned to your server also carries the source transaction as txHash.
Settlement
In settlement events,
chainId, chainName, and blockExplorerUrls describe the destination chain and the settlement transaction, not the payer’s source transaction.
settledAmount is the amount that reached your destination:
settledAmount is present only when the provider or the chain reports the delivered amount.
Risk
Risk events carry noadditionalData. They fire only when the risk state changes.
Fields with nothing to report are left out rather than sent as null, except txHash on source_confirmed.
Delivery behavior
- Same-state events. An execution event can have the same
previousStateandnewState, for example when the payer attaches a different source or requests a new quote. Treat it as an update, not as a new step. - Ordering. Events can arrive in a different order from the one in which the changes happened. Use
newStatetogether with what you already recorded, and read the flow from your server when you need the current state. - Duplicates. The same event can arrive more than once. Make your handler idempotent, as described in Event delivery and best practices.
- Signatures. Verify each event’s signature before acting on it.
Reconciling a completed payment
Whenflow.settlement.updated arrives with newState set to completed:
- Match the event to your order by
flowId. Fetch the flow from your server to read itsmemoor any other reference you stored on it, because webhook payloads do not includememo. - Record the settlement transaction with
settlementTxHash,chainId, andchainNamewhen they are present, and useblockExplorerUrlsto link to it. - For the source side of a receipt, use
txHashfrom thesource_confirmedevent or from the flow. For an exchange payment, which has no source transaction, useexchangeTransactionId. - In
depositmode, creditsettledAmount, not the flow’s requested amount, because a deposit can settle for less than requested. WhensettledAmountis absent, verify the amount on chain from the settlement transaction before crediting it. Inpaymentmode,completedmeans the payment was accepted in full. See Short payments depend on the mode.
Next
Webhook setup
Configuring endpoints and verifying signatures.
Failures and refunds
The failure record that
failed events carry.