Skip to main content
Nuvion delivers event notifications to your server via HTTP POST whenever something significant happens: an account is created, a payment is received, or a transfer completes. Register a webhook endpoint to receive these events in real time rather than polling the API.

Webhook security

Each webhook endpoint has a unique secret Nuvion uses to sign every delivery, so you can verify events actually originate from Nuvion.
The secret is generated and displayed once, at creation. Copy and store it securely before leaving the page. If you lose access to it, rotate the secret instead of trying to recover the original value.

Rotating a webhook secret

Set rotate_secret: true when calling PATCH /entity-webhooks/:webhookId to rotate a webhook’s secret. A new webhook secret is generated and displayed once, the same as at creation. After rotating a secret, update your webhook verification logic to use the new value.

Verifying webhook signatures

Nuvion signs every webhook request using HMAC-SHA256. Each request includes the following headers:

How signatures are generated

To generate the signature, Nuvion constructs the following payload:
Nuvion then computes:
The resulting lowercase hexadecimal digest is included in the x-nuvion-event-signature header as is, with no prefix such as sha256=. Use the x-nuvion-event-timestamp header value exactly as received, including the milliseconds, when you rebuild {timestamp}.{payload}.

How to verify a webhook

  1. Get the webhook secret you stored when you created the webhook or last rotated it. The API never returns it again.
  2. Read the x-nuvion-event-timestamp header.
  3. Construct {timestamp}.{payload} using the webhook payload and timestamp.
  4. Generate an HMAC-SHA256 signature using your webhook secret.
  5. Compare the generated signature with the value in x-nuvion-event-signature.
  6. Process the webhook only if the signatures match.
Compute the signature over the raw request body exactly as received. Parsing the JSON and serializing it again changes the bytes and breaks the match. Use the full secret string, including the nv_wsk_ prefix, as the HMAC key. Compare with a constant-time function, as shown.
In Express, read the raw body with express.raw({ type: 'application/json' }) on the webhook route, and pass req.body.toString() as rawBody.

Webhook IP allowlisting

Nuvion supports IP allowlisting to restrict inbound delivery to Nuvion’s IP ranges only. Contact support to obtain the list of Nuvion IP addresses and configuration details.

Registering an endpoint

Register webhook endpoints with POST /entity-webhooks. You can register multiple endpoints per entity, each subscribing to a different set of events. See the Webhooks API reference for the full lifecycle, and the Nuvion Dashboard if you prefer to manage them there.
Use separate endpoints for sandbox and production. Sandbox events are sent to your sandbox webhook URL; production events go to your production URL.

Child entities

If a child entity doesn’t have its own webhook configured, events triggered on it are sent to its parent entity’s webhook instead. Register a webhook directly on a child entity to override this and receive its events separately. The child must be approved: registering a webhook on an incomplete or failed child returns 403 error_auth_permission_denied. See Managing child entities for how the parent-child relationship works.

Delivery

Nuvion sends an HTTP POST request to your registered endpoint with a JSON body. Your endpoint must return a 2xx status code to acknowledge receipt. Any other response is treated as a failure and triggers a retry.

Request format

All payloads share the same top-level structure:

Retries

If your endpoint does not return 2xx, Nuvion retries up to 2 times: the first retry comes about 1 minute after the initial attempt, and the second about 3 minutes after the first retry. That makes 3 attempts in total over about 4 minutes. After the final attempt, the event is not redelivered. Retries stop as soon as the webhook is blacklisted.
Respond with 2xx immediately and process the event asynchronously. Slow handlers risk timeouts that trigger unnecessary retries.

Check a delivery and recover missed events

Nuvion has no endpoint to retry or replay an event, so you can’t trigger a redelivery yourself. Use the webhook logs to see what Nuvion sent and how your endpoint answered, then read the current state from the API. 1. Find the failed attempts. List the logs for the period of the failure. Each attempt, including every retry, has its own entry, and retries of one event share an event_id. An entry whose response.status isn’t 2xx is a failed attempt. created_from and created_to are Unix timestamps in milliseconds.
A failed attempt looks like this. The endpoint answered 401, so response.status is 401 and response.data holds whatever your server returned:
Failed attempt (401)
See List webhook logs for the filters and the full response. 2. Read the current state. Take the resource ID from the entry’s request.body.data, which is the event payload, and retrieve the resource, as described in Confirm state before acting. The ID is data.id for most events and data.account.id for accounts.created. See Event types for each payload. You don’t need the missed event itself, only the resource’s current status. 3. Catch up after a longer failure. An event isn’t redelivered after its last attempt, and a blacklisted webhook receives no deliveries until you reactivate it. After either, list the resource for the period you missed and process what you find. For example, to read the transfers created during a three-hour outage, oldest first:
Pass next_cursor as cursor to read the next page. See List transfers and Pagination.
Nuvion doesn’t send an Authorization header or your API key. The request carries only Content-Type and the three X-Nuvion-Event-* headers. If a log shows a 401 or 403 response, your own server rejected the request, usually because authentication middleware covers the webhook route. Exempt that route from it and rely on signature verification instead.

Blacklisting

A webhook is blacklisted after 3 failed delivery attempts within a rolling 24-hour window. The window slides: a new calendar day doesn’t reset the count, only 24 hours without a failed attempt does. A freshly reactivated webhook can be blacklisted again after a single failure if its prior failures haven’t aged out yet. A blacklisted webhook receives no further deliveries until reactivated. Reactivate it from the Nuvion Dashboard, or via the API as described in Update a webhook, either by pointing it at a new URL or by confirming the existing one. Either way, Nuvion runs a health check against the URL first and only reactivates the webhook if it passes.

Confirm state before acting

A valid signature proves an event came from Nuvion and wasn’t altered. It doesn’t prove the event is the latest state of the resource. Each event is a snapshot taken when it was sent, and retries or network delays can deliver it after a newer event. For example, if the first delivery of outflows.created fails and is retried a minute later, it can reach you after outflows.completed. A handler that applies events in arrival order then moves a completed transfer back to pending. Treat the event as a trigger, and read the current state from the API before you release goods, credit a balance, or mark a payment settled:
  1. Verify the signature.
  2. Skip the event if you have already processed its ID. See Idempotency.
  3. Retrieve the resource using the ID in the event, and act on its current status.
For example, when outflows.completed arrives, retrieve the transfer using the data.id from the event and proceed only if status is successful:
curl
An event for a child entity is delivered to its parent’s webhook, and the retrieve call looks in the authenticating entity by default. Pass the entity_id from the event’s data as a query parameter, such as ?entity_id=01HXYZ7706ABCDEFGHJKMNPQRS, or the call returns 404 error_resource_not_found. See Managing child entities.

Idempotency

Nuvion may deliver the same event more than once, for example if your server acknowledges receipt after a network timeout that already triggered a retry on Nuvion’s side. Your webhook handler must be idempotent. The recommended approach: store processed event IDs using the id field in the event data, and skip any event you have already handled.

Event types

See Event types for full payload schemas and examples for each event.

What’s next

Event types

Full payload schemas and examples for every event.

Webhooks API reference

Create, update, and manage webhook endpoints, plus delivery logs and test events.