Skip to main content
Money movement is asynchronous. An off-ramp is requested, then converts, then settles to a bank account over time. Webhooks let Spritz notify your backend the moment something changes, so you don’t have to poll. Webhooks are configured per integrator, so you manage them with your integrator credentials (HMAC). See Authentication.
Webhooks are global, not per user. You subscribe once and receive events for all of your users. There’s no need to register a webhook per user, and you don’t pass a user API key when managing webhooks. These are integrator endpoints, so they use your integrator signing headers only.

Register an endpoint

Create a webhook by pointing it at an HTTPS URL on your backend and listing the events you want. Use "*" to subscribe to every current and future event.
You can list, update, and delete webhooks too:

Events

Subscribe to "*" to receive all of these, including events added later.

Receiving a delivery

Spritz sends a POST to your URL with a JSON body identifying what changed:
id is omitted for events whose subject is the user rather than a separate resource — capabilities.updated is the case you are most likely to meet. Key your handler off event and treat id as optional:
The body tells you which resource changed, not its full state. Treat it as a trigger: fetch the resource from the API to get authoritative state before acting on it.

Verifying signatures

Each delivery is signed so you can confirm it came from Spritz and wasn’t modified in transit. Set a webhook secret with POST /v1/integrator/webhook-secret, then verify the Signature header against the raw request body using HMAC-SHA256. Always verify against the raw body, before parsing JSON.

Best practices

Acknowledge with a 2xx immediately and hand off to a queue. Slow responses can trigger retries and duplicate processing.
Retries mean the same event can arrive more than once. Deduplicate on the resource id. See Idempotency.
Events are dispatched concurrently and are not ordered. onramp.completed can arrive before onramp.created for the same on-ramp, and does so most often when the two transitions happen close together.The payload carries no timestamp, so order cannot be reconstructed from the event alone. Key your handler off the resource id, fetch current state from the API, and make each handler safe to run regardless of what has already been processed for that resource — including the case where the first event you ever see for a resource is its last one.
On receipt, fetch the current resource from the API to get authoritative state rather than relying solely on the event body.