Reconciliation

Learn how to use Avvio's sequence-based Event Log to guarantee reliable, replayable ledger synchronization and automated reconciliation.

The Event Log is the authoritative reconciliation primitive for syncing your internal ledger with Avvio.

While webhooks provide real-time push notifications, the Events API provides guaranteed, replayable, sequence-ordered reconciliation.

Webhook Event Received
        ↓ (Trigger)
Read Latest Events Feed (GET /events?since=)
        ↓
Deduplicate by Event ID
        ↓
Update Internal Ledger

The Events Feed

Fetch events since your last processed sequence number:

GET /payments/organizations/{orgId}/events?since=40

Response:

{
  "data": [
    {
      "id": "evt_01J9812A",
      "sequence": "41",
      "type": "payout.processing",
      "payoutId": "payout_98124b89",
      "status": "processing",
      "createdAt": "2026-08-17T09:12:00.000Z"
    },
    {
      "id": "evt_01J9813B",
      "sequence": "42",
      "type": "payout.completed",
      "payoutId": "payout_98124b89",
      "status": "completed",
      "createdAt": "2026-08-17T09:12:35.000Z"
    },
    {
      "id": "evt_01J9819Z",
      "sequence": "43",
      "type": "payout.returned",
      "payoutId": "payout_98124b89",
      "status": "failed",
      "failureCode": "returned_by_bank",
      "fundsReturned": true,
      "createdAt": "2026-08-19T14:02:11.000Z"
    }
  ],
  "hasMore": false,
  "nextSince": "43"
}

Key Reconciliation Properties

  1. Sequence-Based Cursor: The cursor is an integer sequence, not a timestamp. Timestamps can produce ties across concurrent transactions, causing dropped events. Store nextSince after each sync batch.
  2. At-Least-Once Delivery: The feed guarantees at-least-once delivery. Always deduplicate incoming events against the unique id (evt_...).
  3. Dedicated payout.returned Event: Reversals produce a distinct payout.returned event rather than a generic payout.failed, allowing your accounting workers to immediately route ledger reversals.
  4. Immutable History: Once written, an event record is immutable and never updated in place.

Events Feed vs Orders List

FeatureGET /eventsGET /orders
OrderingMonotonic sequencecreatedAt descending
Old Payout UpdatesAppended as new events at the end of the feedUpdates existing record without reordering
Primary Use CaseAutomated ledger synchronizationAdmin dashboard history & UI search
Paginationsince={sequence}Opaque cursor
Rate Limit600 requests / minute600 requests / minute

Did this page help you?