Listing endpoints: which one to use
Dfns provides three endpoints for viewing wallet activity. Each serves a different purpose:| Endpoint | What it returns | Direction | Statuses | Filters |
|---|---|---|---|---|
| Get Wallet History | Confirmed on-chain events | Incoming and outgoing | Confirmed only | direction, kind, contract |
| List Transfers | Transfer API requests | Outgoing only | Pending, Executing, Broadcasted, Confirmed, Failed, Rejected | None |
| List Transactions | Broadcast API requests | Depends on transaction | Pending, Executing, Broadcasted, Confirmed, Failed, Rejected | None |
- Use History to show users their complete activity feed (incoming deposits + confirmed outgoing transfers)
- Use Transfers to track the status of outgoing transfers you initiated via the Transfer API
- Use Transactions to track the status of custom transactions you submitted via the Broadcast API
Transfers and Transactions only appear in History once they reach
Confirmed status. To show a complete view (including pending and failed), combine the relevant listing endpoints.Transaction lifecycle
When you submit a transaction via the Transfer API or Broadcast API, it goes through these states:| Status | Description |
|---|---|
Pending | Transaction created, awaiting policy approval or signing |
Broadcasted | Signed and sent to the network mempool |
Confirmed | Successfully included in a block |
Failed | Broadcast succeeded but execution failed on-chain |
Rejected | Blocked by policy or approval rejected |
Polling
Simple approach for occasional status checks. Query the transfer or transaction until it reaches a terminal state.Webhooks (recommended)
For production systems, use webhooks to receive status updates in real-time instead of polling.Relevant events
| Event | When it fires |
|---|---|
wallet.transfer.requested | Transfer created |
wallet.transfer.broadcasted | Transfer sent to mempool |
wallet.transfer.confirmed | Transfer confirmed on-chain |
wallet.transfer.failed | Transfer failed |
wallet.transfer.rejected | Transfer rejected by policy |
wallet.transaction.requested | Broadcast transaction created |
wallet.transaction.broadcasted | Transaction sent to mempool |
wallet.transaction.confirmed | Transaction confirmed on-chain |
wallet.transaction.failed | Transaction failed |
wallet.transaction.rejected | Transaction rejected by policy |
wallet.blockchainevent.detected | Incoming deposit or other on-chain event |
Basic handler
Setup
- Create your webhook endpoint (see Local development for testing)
- Create a webhook via API or dashboard
- Subscribe to the events you need
- Verify webhook signatures to ensure events are from Dfns
Detecting deposits
Use thewallet.blockchainevent.detected event to detect incoming transfers:
Deposit detection (
wallet.blockchainevent.detected) is only available for Tier-1 networks.Matching deposits to your records
When processing incoming payments, you need to match blockchain transactions to records in your system (e.g., customer deposits, invoice payments). Since the sender initiates the transaction, you can’t include your own tracking IDs in the transfer. Here are two strategies to solve this.Strategy 1: Unique wallet per deposit
Assign a unique wallet address to each pending deposit or customer. When you receive awallet.blockchainevent.detected event, you know exactly which deposit it belongs to based on the receiving wallet.
How it works:
- When a customer initiates a deposit, create or reserve a wallet for that specific transaction
- Give the customer this wallet’s address to send funds to
- When the webhook fires for that wallet, match it to your pending deposit record
- After confirmation (plus a safety buffer), release the wallet back to your pool
- Works on all networks
- Pre-create a pool of wallets to avoid creation latency during deposit flow
- Include a cooldown period before reusing wallets (to handle delayed transactions)
- Monitor pool size and create new wallets as needed
Strategy 2: Memo fields (select networks)
Some networks support a memo (or equivalent) field that travels with the transaction. You can ask customers to include a reference code when sending funds, then match on that memo in the webhook. Supported networks:| Network | Field name | Notes |
|---|---|---|
| Stellar | memo | Commonly used by exchanges for deposit identification |
| Cosmos | memo | Standard field for transaction notes |
| TON | memo | Supported on native and Jetton transfers |
| Algorand | memo | Transaction notes field |
| Hedera | memo | Supported on all transfer types |
| XRP Ledger | destinationTag | Numeric tag (0-4294967295) |
| Strategy | Best for |
|---|---|
| Unique wallet per deposit | High reliability, any network, automated systems |
| Memo field | Networks that support it, when UX allows for customer input |
Confirmation times
Different networks have different finality characteristics:| Network | Average confirmation | Notes |
|---|---|---|
| Ethereum | ~12 seconds | True finality ~15 min |
| Polygon | ~2 seconds | Checkpoints to L1 |
| Arbitrum | ~0.5 seconds | Depends on L1 posting |
| Solana | ~0.4 seconds | Near-instant |
| Bitcoin | ~10 minutes | 6 blocks for high confidence |
Dfns marks transactions as
Confirmed when included in a block. For high-value transactions on chains with probabilistic finality, you may want additional application-level confirmation tracking.Handling failures
Rejected by policy
- Check your policy configuration
- Request approval if policy requires it
- Adjust transaction parameters
Failed on-chain
- Insufficient balance (including gas)
- Smart contract revert
- Nonce issues
- Gas limit too low
Related
Webhooks guide
Best practices, verification, local development
Webhook events
Complete event reference and data schemas
Transfer API
API reference for transfers
Idempotency
Preventing duplicate transactions
