Define a payment before watching it
Specify the destination, cluster, accepted asset mint, amount units and commitment policy. A SOL transfer and an SPL token transfer affect different accounts. A token symbol alone is insufficient to identify an asset, and a notification alone may not contain all the evidence needed for accounting.
Use a durable ingestion path
receive_signal(signature)
transaction = fetch_confirmed_transaction(signature)
validate_destination_asset_and_amount(transaction)
insert_payment_once(chain, signature, transfer_identity)
advance_recovery_checkpoint_after_commit()This pseudocode separates discovery from verification. Keep raw evidence for the transfer you credited, including the transaction execution status. One transaction can contain multiple instructions and transfers.
Repair missed notifications
- Track a durable signature/slot checkpoint for the monitored address or token account.
- After reconnecting, page getSignaturesForAddress until the previous checkpoint is reached.
- Fetch and validate every new candidate transaction.
- Deduplicate overlaps and explicitly flag a history gap if the checkpoint is outside available retention.
Reconcile balances without inventing payments
An account balance change is a useful alarm but does not identify the cause by itself. Fees, token-account lifecycle and unrelated instructions can alter balances. Prefer transfer-level evidence and periodically compare your ledger with verified chain state. For large monitoring workloads, use supported filters and capacity; a general DEX Indexer is not automatically a complete payment ledger for arbitrary addresses and assets.