Collect incoming Solana payments with recovery checkpoints

Combine notifications, signature history and explicit asset validation.

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

  1. Track a durable signature/slot checkpoint for the monitored address or token account.
  2. After reconnecting, page getSignaturesForAddress until the previous checkpoint is reached.
  3. Fetch and validate every new candidate transaction.
  4. 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.

Sources

Continue reading