Skip to main content
Turn AuthCaptureEscrow logs into a durable payment feed. A WebSocket subscription provides low-latency wakeups, while an overlapping confirmed backfill supplies the canonical source of truth after disconnects or reorgs.

Demo

The demo above is mock only. If you want to see onchain demos on Vibenet, head to Base chain demos.

Subscribe and Backfill

Watch the v1.1.0 escrow for PaymentAuthorized, PaymentCharged, PaymentCaptured, PaymentVoided, PaymentReclaimed, and PaymentRefunded. They all share the indexed paymentInfoHash.
TypeScript worker
Implement replaceRange as one database transaction: remove rows in the overlap, insert the current canonical logs, rebuild affected payment state, and advance the cursor only after all writes succeed.
After reconnects or short reorgs, the overlap scan converges on canonical protocol events without applying one log twice.
Do not mix v1.0 and v1.1 event ABIs. PaymentCharged and PaymentCaptured changed event topics when settlement switched from feeBps to absolute feeAmount.
Choose a confirmation policy that matches your risk tolerance. See transaction finality.

See Also

Verify a Payment

Validate each candidate event against its order.

Reconcile Payments

Produce charge, capture, fee, and refund rows.