Reconciliation
Webhooks are the primary signal, but you should also poll as a backstop for missed or delayed deliveries. Treat ZenVault's transfer state as the source of truth.
Poll transfers incrementally
GET /v1/transfers?since=<last-checkpoint>&limit=200
sinceis an ISO timestamp — transfers created at/after it.- Page with
cursoruntil a page returns fewer thanlimititems. - Advance your checkpoint to the newest
createdAtyou've processed.
Other useful filters: state, assetCanonical, accountId (source or
destination), srcAccountId, destAccountId.
Deposits show up here too
Inbound deposits appear as external transfers with srcAccountId: null and
metadata.direction: "inbound" — so a single GET /v1/transfers sweep
reconciles both withdrawals and deposits.
Force a re-poll
If you need the freshest state for one transfer right now (rather than waiting for the next webhook or poll), force an on-demand provider re-poll:
POST /v1/transfers/{id}/refresh
A simple reconciler loop
GET /v1/transfers?since=<checkpoint>&limit=200, paging oncursor.- For each item, upsert into your ledger keyed by transfer
id(idempotent). - Move your checkpoint forward.
- Run it on a schedule (e.g. every few minutes) alongside your webhook handler.