NorbaNorba
Guides · Webhooks

Webhooks

Norba sends a signed event to your HTTPS endpoint whenever an order changes, whether the change came from your code, the dashboard or the airline. You do not need to keep checking.

D-203
NORBA/webhookRETRY30 s, 1, 2, 4 … 128 minNorbaPosts every order changeSigned envelopeCheck X-Norba-Signature firstYour endpointAnswer 2xx within 10 sNo 2xx back?Sent again, 10 tries in all

Registering an endpoint

In Dashboard → Webhooks (owner or admin). Pick the events you want, or none to get all of them. One endpoint gets events from both sandbox and production; the environment field tells them apart.

  • HTTPS only, on a public address; private and local addresses are refused.
  • No user name or password in the URL. Redirects are not followed.
  • Rotate secret creates a new secret; the old one keeps working alongside it for 24 hours.
  • Send test event sends a signed ping to the endpoint.
  • The signing secret (whsec_…) is shown once, when you create the endpoint.

Events

EventWhen it fires
order.cancelledThe order was cancelled, by you or by the airline.
order.createdPOST /v1/orders made a booking, unpaid or paid. Sent once per order.
order.refundedA refund was accepted.
order.schedule_changedThe airline changed flights on the order. Includes the flights before and after. If the change also changes the status, that status's event is sent too.
order.ticketedAn existing order became ticketed.
order.ticketing_deadline_approachingAn unpaid hold's payment deadline is less than 24 hours away. Sent once per order.
order.updatedThe order changed without becoming ticketed, cancelled or refunded: a flight change, seats, extras, a partial cancellation, or a status the airline changed.
pingA test event sent from the dashboard.

Quotes send no event. Read status in the body to see the order’s current status.

What arrives

One JSON POST per event per endpoint, with these headers:

HeaderValue
X-Norba-DeliveryThe delivery id: one event to one endpoint.
X-Norba-Environmentsandbox or production.
X-Norba-EventThe event name.
X-Norba-Event-IdThe event id (id in the body). Same on every retry and every endpoint: use it to skip duplicates.
X-Norba-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256 (hash-based message authentication code)>. Two v1 values while a secret is being replaced.

sequence only goes up for one order: keep the highest you have seen and ignore events with a lower one. The event’s fields are in data, and also at the top level for older integrations. Ignore fields you do not know.

{
  "id":         "9b1a3c2e-5d4f-5a6b-8c7d-0e1f2a3b4c5d",
  "type":       "order.ticketed",
  "created_at": "2026-09-27T10:02:11.482931Z",
  "sequence":   1790503331482931,
  "data": {
    "event":       "order.ticketed",
    "order_id":    "AA001Y1XD7ZA6",
    "pnr":         "JBQGEY",
    "airline":     "AA",
    "environment": "production",
    "status":      "ticketed",
    "origin":      "BCN",
    "destination": "JFK",
    "currency":    "EUR",
    "total":       380.62,
    "occurred_at": "2026-09-27T10:02:11Z"
  }
}
  • order.schedule_changed: the order fields plus notification_id and changes[], each with before, after (null when a flight was added or removed) and text.
  • order.ticketing_deadline_approaching: airline, environment, order_id, pnr, ticketing_deadline.
  • ping: environment, message, occurred_at, test: true, webhook_id.

The event tells you something changed; it is not the full order. Call GET /v1/orders/{orderID} to get the order as it is now.

Verifying the signature

Compute HMAC-SHA256 of <t>.<raw body> with your secret, whsec_ prefix included. Accept the event when it matches any v1 (compare in constant time) and t is within a few minutes of your clock.

import express from "express";
import { createHmac, timingSafeEqual } from "node:crypto";

function verify(header, rawBody, secret, tolerance = 300) {
  const pairs = String(header || "").split(",").map((kv) => kv.trim().split("="));
  const ts = (pairs.find(([k]) => k === "t") || [])[1];
  if (!ts || Math.abs(Date.now() / 1000 - Number(ts)) > tolerance) return false;
  const expected = createHmac("sha256", secret).update(`${ts}.`).update(rawBody).digest();
  return pairs.some(([k, v]) => {
    if (k !== "v1" || !v) return false;
    const given = Buffer.from(v, "hex");
    return given.length === expected.length && timingSafeEqual(given, expected);
  });
}

const app = express();
// Keep the raw body: express.json() would re-serialise it.
app.post("/norba", express.raw({ type: "application/json" }), (req, res) => {
  if (!verify(req.get("X-Norba-Signature"), req.body, process.env.NORBA_WEBHOOK_SECRET)) {
    return res.status(400).end();
  }
  // queue the work, then acknowledge
  res.status(204).end();
});

Acknowledging and retries

  • 50 failures in a row, over at least a day, switch the endpoint off and email the agency's admins. Turn it back on from the dashboard.
  • Answer with any 2xx within 10 seconds, then do the work. Anything else, a 3xx included, counts as a failure.
  • An event can arrive more than once: skip event ids you have already handled. Events about one order arrive in order; events about different orders can arrive in any order.
  • Dashboard → Webhooks lists each endpoint's deliveries. From there you can send one again, or resend everything since a given time.
  • Retries: 30 s, then 1, 2, 4, 8, 16, 32, 64 and 128 min — 10 attempts in about 4¼ hours, then we stop trying.

Statuses are on Orders Lifecycle; the operations that fire events are on Servicing.

Order Webhooks: Events, Signatures & Retries | Norba Docs