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.
Assign a unique wallet address to each pending deposit or customer. When you receive a wallet.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
Copy
Ask AI
// Simplified wallet pool patternasync function reserveDepositWallet(depositId: string): Promise<string> { // Get an available wallet from your pool, or create one const wallet = await getAvailableWallet() ?? await createNewWallet() // Mark it as reserved in your database await db.walletReservations.create({ walletId: wallet.id, depositId: depositId, reservedAt: new Date() }) return wallet.address}// In your webhook handlercase 'wallet.blockchainevent.detected': const { walletId, blockchainEvent } = event.data if (blockchainEvent.direction === 'In') { // Find the deposit associated with this wallet const reservation = await db.walletReservations.findByWalletId(walletId) if (reservation) { await creditDeposit(reservation.depositId, blockchainEvent.value) } } break
Considerations:
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
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)
Memo-based matching requires customers to correctly include the reference. Always have a fallback process for deposits with missing or incorrect memos.
When to use each strategy:
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
Many platforms use both: unique wallets as the primary method, with memo as an optional optimization on supported networks.
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.