CloudEvents Webhooks on Localhost: Arrays, Content Types, and the Parsers That Skip Them

CloudEvents Webhooks on Localhost: Arrays, Content Types, and the Parsers That Skip Them

On December 10, 2026, eight days from today, Qlik Cloud stops sending hybrid webhook payloads and sends CloudEvents only. Intuit has already moved QuickBooks Online webhooks to CloudEvents. Its mandatory migration deadline was extended from May 15 to July 31, 2026, and has now passed. Two vendors, one standard, and the same quiet failure waiting on your laptop: a handler that never actually reads the request.

This article is about the envelope, not the migration. If you have been through a provider’s v1-to-v2 cutover before, you know the field-mapping work. The part that bites during local development is different: CloudEvents deliveries can arrive as a JSON array, under a content type your JSON parser does not recognize. Here is what the vendors send, what popular parsers do with it (I tested four), and how to build a localhost harness that catches the problem before production does.

What changed, and when (checked December 2, 2026)

Qlik Cloud. Events that were not already CloudEvents have been sent as hybrids, carrying both legacy and CloudEvents fields, since November 3, 2025. Qlik’s changelog says the legacy fields (eventId, eventTime, eventType, cloudEventsVersion, contentType and the extensions properties) are removed on December 10, 2026, when hybrid events become CloudEvents-only. Qlik moved that date from October 6, 2026, in an update dated October 2, so older posts and cached pages may still show the earlier one. Qlik says the new format follows CloudEvents 1.0.2, and the replacements are id, source, type, time and the other standard attributes. Qlik also published a community guide for migrating Qlik Automate workflows, which is worth reading if automations trigger from webhooks.

Intuit QuickBooks Online. Intuit’s developer blog says its webhooks infrastructure moved to CloudEvents, and that an app which makes no change will stop being able to process notifications. The original deadline was May 15, 2026. A May 5, 2026 update on Intuit’s Medium post moved it to July 31, 2026, and the Intuit blog page still shows the older date. Apps switch with a per-app option on the Webhooks page in the developer portal, in sandbox and production separately, and Intuit says you can switch back if needed. Intuit’s SDKs support both formats. Its post names Java 6.5.2, PHP 6.2.2 and .NET 14.7.3 as the versions to update to.

One gap to know about. Hookdeck’s QuickBooks guide, last updated November 18, 2026, includes live test deliveries. It reports that an app with the CloudEvents toggle off (the default) still received the legacy eventNotifications object, and that no Intuit page it could read says when the legacy format stops being sent. Don’t assume your app is on either format. Check the toggle, confirm with a real delivery, and until then handle both shapes.

CloudEvents over HTTP: three modes, three signals

The CloudEvents HTTP protocol binding (v1.0.2) defines three content modes, and the receiver tells them apart by the Content-Type header:

Mode Content-Type Body
Binary Whatever the event’s datacontenttype is (often application/json) Just the event data; attributes arrive as ce-* headers
Structured application/cloudevents+json One JSON object holding attributes and data
Batched application/cloudevents-batch+json A JSON array of event objects

The spec’s detection rule is simple. A value starting with application/cloudevents-batch means batched mode, a value starting with application/cloudevents means structured, and anything else defaults to binary. IANA registered both JSON media types on May 12, 2026. It describes application/cloudevents+json as a body with exactly one CloudEvent, and the batch type as a body with any number of events as a JSON array. The spec also says batched mode must not be used unless solicited. Registering a webhook endpoint is arguably that solicitation, but either way your handler cannot assume one event per request.

The consequence is worth stating plainly. A body can be valid CloudEvents JSON and still arrive labelled application/json. By the spec’s own rule a strictly compliant receiver would treat that as binary mode and look for ce-* headers that are not there. Don’t point an SDK’s HTTP decoder at every vendor’s endpoint and assume it will work.

Two vendors, two envelopes

Qlik Cloud QuickBooks Online (CloudEvents)
Body shape One JSON object JSON array, one element per event
Content-Type application/json in Qlik’s documented example request application/cloudevents-batch+json; charset=utf-8 in Hookdeck’s November 2026 test delivery
Event type type, e.g. com.qlik.analytics.change-store.changes.saved type, e.g. qbo.account.created.v1
Identity tenantid and userid at the top level intuitaccountid (the realm ID) and intuitentityid per element
Signature header Qlik-Signature, hex HMAC-SHA256 of the raw body intuit-signature, base64 HMAC-SHA256 of the raw body
Secret Optional, you choose it, 32 to 64 characters Verifier Token from the portal, one per environment

Intuit’s own documentation is inconsistent about the content type. Its sample headers show application/json; charset=utf-8, and its migration notes, as quoted by Hookdeck, warn that CloudEvents payloads may arrive as application/cloudevents+json. The test delivery Hookdeck captured used neither. It was the batch type, with an intuit-notification-schema-version: 2.0 header, while a legacy test delivery carried 1.0 and application/json; charset=utf-8. Treat the header as a handy tell for which shape you received, but don’t rely on it in production code.

Two more QuickBooks details matter for the array. Intuit says one notification can contain events for different companies, so read the realm from every element, never once per request. And data can be empty or missing (Intuit’s own sales receipt example omits it), so treat it as optional and fetch the record from the API.

On the Qlik side, the “Cloud event” checkbox on the webhook form switches a webhook to the CloudEvents format, and Hookdeck reports that it cannot be undone once saved. Use a throwaway test webhook for it.

Which parsers skip the request

I sent the same one-element array to four setups under four content types: application/json, application/cloudevents+json, application/cloudevents-batch+json; charset=utf-8 and, for Express, text/plain.

Framework (version tested) application/json CloudEvents types
Express 4 (4.22.3), default express.json() Parsed as an array 200, but req.body is {}
Express 5 (5.3.0), default express.json() Parsed as an array 200, but req.body is undefined
Fastify (5.12.8), default parser Parsed as an array 415 FST_ERR_CTP_INVALID_MEDIA_TYPE
Flask (3.1.3), request.get_json() Parsed as an array Parsed as an array

These were the latest releases of each on December 2, 2026. Flask accepts any application/*+json type, which is why Python handlers often work by accident. The Node results are the dangerous ones, and they fail in different ways.

Express skips silently. The default JSON parser only matches application/json. For anything else it moves on without touching the body, so your route runs with an empty or missing req.body. If you verify signatures against the raw body, the check fails and you return 401. If you don’t, your code iterates an empty object and returns 200 having processed nothing, which is worse: the vendor thinks the event was delivered.

Fastify rejects loudly. A 415 is at least visible, but it is still a failed delivery. Per Hookdeck’s summary of Intuit’s documentation, QuickBooks expects a 200 within three seconds and retries failures at 10 seconds, 20 seconds, 30 seconds, 5 minutes, 20 minutes, 2 hours, 4 hours and 6 hours, then every six hours. Intuit also warns that you may not receive later events until the first is acknowledged. Hookdeck adds, from Intuit’s migration notes, that a 400 marks the delivery failed and retries the whole batch.

The same trap applies to a signature middleware that expects application/json. Whatever raw-body capture you use must run for every content type on the webhook route. Before you can preserve the bytes, the parser has to agree to read them.

Fixing the parser

For Express, widen the JSON parser’s type option. I tested this on both versions. All three JSON content types now yield an array, while text/plain still falls through:

app.use(express.json({ type: ['application/json', 'application/*+json'] }));

If you verify signatures (you should), skip the JSON parser on that route and take the bytes yourself:

app.post('/webhooks/quickbooks',
  express.raw({ type: () => true, limit: '10mb' }),
  handler);

For Fastify, register a parser for the CloudEvents types. I tested the buffer form, and both types now return a buffer:

fastify.addContentTypeParser(
  ['application/cloudevents+json', 'application/cloudevents-batch+json'],
  { parseAs: 'buffer' },
  (req, body, done) => done(null, body)
);

One handler for both envelopes

Until your app and your vendors have settled on one shape, normalize at the door and let the rest of your code see a single event type. This handler verifies the QuickBooks signature over the raw bytes, then flattens the CloudEvents array, the legacy object and a single CloudEvent object into one list:

const crypto = require('crypto');
const express = require('express');

function verify(raw, header, token) {
  if (!header || !token) return false;
  const expected = crypto.createHmac('sha256', token).update(raw).digest('base64');
  const a = Buffer.from(header), b = Buffer.from(expected);
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

function normalize(body) {
  if (Array.isArray(body)) {            // QuickBooks CloudEvents batch
    return body.map(e => ({ id: e.id, type: e.type, realm: e.intuitaccountid, raw: e }));
  }
  if (Array.isArray(body?.eventNotifications)) {   // QuickBooks legacy
    return body.eventNotifications.flatMap(n =>
      (n.dataChangeEvent?.entities ?? []).map(en =>
        ({ id: null, type: `${en.name}.${en.operation}`, realm: n.realmId, raw: en })));
  }
  if (body?.specversion) {              // single CloudEvent object
    return [{ id: body.id, type: body.type, realm: body.tenantid, raw: body }];
  }
  return [];                            // unknown shape: log it, don't throw
}

const app = express();
app.post('/webhooks/quickbooks', express.raw({ type: () => true, limit: '10mb' }), (req, res) => {
  const raw = Buffer.isBuffer(req.body) ? req.body : Buffer.alloc(0);
  if (!verify(raw, req.get('intuit-signature'), process.env.QUICKBOOKS_VERIFIER_TOKEN)) {
    return res.sendStatus(401);
  }
  const events = normalize(JSON.parse(raw.toString('utf8')));
  // persist events, then process them asynchronously
  res.sendStatus(200);
});

I ran this on Express 5.3.0 against four requests. A CloudEvents batch sent as application/cloudevents-batch+json, the same bytes sent as application/json, and a legacy object all verified and normalized correctly. A request with a bad signature returned 401.

Legacy QuickBooks entries have no event ID, so a dedupe key has to be built from the realm, entity name, entity ID, operation and lastUpdated. For CloudEvents, store each event’s id.

For Qlik, the same pattern applies with its own pieces: a hex digest in Qlik-Signature, the raw body, and type, id and time as the primary fields. Qlik’s guidance is to move to those now and keep the legacy names only as a fallback until December 10.

Testing CloudEvents webhooks through a tunnel

Both vendors need a public HTTPS URL pointing at your laptop, and a tunnel is the usual answer. The tunnel isn’t where this problem lives: it forwards bytes and headers, and the failure happens in your parser. What a tunnel does give you is a way to receive real deliveries locally. Hookdeck’s CLI, for instance, forwards to localhost with npx hookdeck-cli listen 3000 quickbooks --path /webhooks/quickbooks, and any tunnel that keeps the same URL between restarts saves you from re-registering the endpoint.

A workable loop:

  1. Capture real deliveries. Save the raw body and the full header set of every request to disk. Fixtures from real traffic are worth more than examples from documentation. Hookdeck notes that Qlik publishes complete examples for only 2 of its 22 event types.
  2. Replay with curl. Use printf '%s' to write the body, because a trailing newline changes the HMAC:
printf '%s' '[{"specversion":"1.0","id":"88cd52aa-33b6-4351-9aa4-47572edbd068","type":"qbo.account.created.v1","intuitentityid":"1234","intuitaccountid":"310687"}]' > batch.json

curl -i http://localhost:3000/webhooks/quickbooks \
  -H 'Content-Type: application/cloudevents-batch+json; charset=utf-8' \
  -H 'intuit-signature: PTs9BSwjYqOgFhLMBnVFCOlBZ+EC6WWqVDBTUoSfxH8=' \
  --data-binary @batch.json

With the verifier token quickbooks-test-verifier-token, that signature is the correct base64 HMAC-SHA256 of that exact body. I recomputed it independently and it matches the value in Hookdeck’s QuickBooks guide, so you can test your verification code before a real delivery arrives.
3. Use the vendors’ test tools. Intuit’s portal has a Send test events option on the Webhooks page, with separate sandbox and production configurations. Hookdeck reports that with the CloudEvents toggle on, the picker lists 105 event names, and that void operations are spelled void, not voided (for example qbo.invoice.void.v1). Qlik’s webhook form has the Cloud event option described above.
4. Account for timing quirks. Intuit says the first notification can take up to five minutes, and notifications only arrive for companies that have authorized your app through OAuth, sandbox companies included.

Checklist before the cutover

  • Read the raw body for every content type on the webhook route.
  • Accept application/cloudevents+json, application/cloudevents-batch+json and application/json, with or without ; charset=utf-8.
  • Branch on Array.isArray(body), then normalize into one internal event.
  • Loop over every element and read the realm or tenant per event.
  • Treat data as optional.
  • Log unknown shapes and content types instead of throwing.
  • Return 200 quickly, then process from a queue.
  • Confirm in a real delivery which shape your app receives today.

FAQ

Are CloudEvents webhooks always JSON arrays?
No. A single event can be a JSON object (structured mode, application/cloudevents+json), and batched mode is the array form. QuickBooks sends arrays, while Qlik’s documented example is a single object.

What Content-Type does QuickBooks send for CloudEvents?
Hookdeck’s November 2026 test delivery used application/cloudevents-batch+json; charset=utf-8. Intuit’s docs show application/json in samples and its migration notes mention application/cloudevents+json. Accept all three.

When does Qlik Cloud remove legacy webhook fields?
On December 10, 2026, according to Qlik’s changelog, extended from October 6, 2026.

Is the old QuickBooks webhook format still sent?
Intuit’s deadline for migrating was extended to July 31, 2026 and has passed. Hookdeck’s November 2026 testing still received the legacy object on an app with the CloudEvents toggle off, and it found no end date stated on Intuit’s pages. Check your app’s toggle and handle both shapes.

Why does my Express handler return 200 but process nothing?
The default express.json() only parses application/json. For other content types, req.body stays empty (Express 4) or undefined (Express 5). Widen the parser’s type option or use express.raw().

Sources


Originally published at https://instatunnel.my/blog/cloudevents-webhooks-on-localhost-arrays-content-types-and-the-parsers-that-skip-them

Comments