- The change feed lists the transactions of a space that were created, changed, or removed after a cursor.
- A webhook posts a small event to your server when a space has new changes. The event carries no financial data; your server then reads the change feed.
Read the change feed
GET /v1/spaces/{space_id}/transactions/changes needs the pfm:read scope.
Each item names one transaction once per page:
next_cursor after every read, even when data is empty, and pass it as after the next time. While has_more is true, read again at once. The cursor is opaque: do not build or change it.
To start a copy:
- Read the change feed without
afteruntilhas_moreisfalse, and storenext_cursor. - Export the history with
GET /v1/spaces/{space_id}/transactions. - From then on, read the change feed with the stored cursor. A change that happened during the export comes again; apply it again.
Receive webhooks
Webhooks are in beta for Pro and Premium accounts. When your account has them, Settings > Connected apps shows a Webhooks card.- Choose the space and enter an
httpsURL that your server answers on. Visor does not call private, loopback, or reserved addresses, and does not follow redirects. - Copy the signing secret (
whsec_...). Visor shows it only once. To change it, delete the webhook and add it again. - Select Send test. Your server receives a
webhook.testevent.
Events
data.after is a change feed cursor that starts after the previous event. If your server stores its own cursor, read from the stored cursor instead: it never skips a change.
The request is a POST with Content-Type: application/json and these headers:
Verify the signature
Compute HMAC-SHA256 with the whole secret as the key, over the text<t>.<raw body>. Compare the hex result with v1 in constant time, and reject a t older than 5 minutes. Use the raw body as received; do not parse and serialize it again.
Answer, duplicates, and retries
- Answer with any
2xxstatus within 10 seconds. Read the change feed after you answer, not before. - A retry sends the same
id. Store the IDs you processed and skip one you already have. - Any other status, a timeout, or a connection error is a failure. Visor retries for about 24 hours, with a delay that doubles from 30 seconds up to 2 hours.
- When the last retry fails, Visor disables the webhook. Settings shows it as disabled; select Reactivate when your server is back, then read the change feed from your stored cursor to catch up.
- An account that loses its Pro or Premium plan, or its access to the space, stops receiving events. The webhook stays and events start again when access returns.