Skip to main content
Turn confirmed protocol logs into ledger rows keyed by paymentInfoHash. The initial authorization or charge establishes immutable payment terms; later events update capturable and refundable accounting.

Demo

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

Build a Settlement Report

Query the v1.1.0 escrow, then create gross, fee, and refund rows from its lifecycle events.
TypeScript backend
For every charge or capture:
Accounting
For every refund, reduce the refundable balance by the gross refund amount. A void or reclaim reduces only the capturable balance and does not reverse earlier captures.
For an authorization, reconcile the authorized amount to captures plus the voided or reclaimed amount plus current capturableAmount. Reconcile total charged and captured value to refunds plus current refundableAmount.
Run financial reports only through a finalized block range. If you display more recent confirmations, label them provisional and replace them after a reorg.

See Also

Watch for Payments

Keep the underlying escrow event index current.

Refund a Payment

Understand gross refund accounting and liquidity.