IDCanopy Developers
IDCanopy Workflows & UIUmbrella eID & eSigning

Webhooks

Set the webhook URL, verify the signature and handle session and signer events

In testing. The complete flow runs in our test environment; there is no production host yet. Access, test credentials and the base URL on request from IDCanopy.

The session tells you when it or one of its signers needs you or has finished, by webhook.

Set the URL

PUT /qes-onboarding/webhook with { "url": "https://app.example.com/hooks/qes" }. The URL must use https and resolve to a public address; redirects are not followed.

The call replaces any earlier URL and returns a new signing_secret, shown only in this response. Store it.

{
  "url": "https://app.example.com/hooks/qes",
  "signing_secret": "whsec_3q2-7wEXAMPLEonlyNotARealSecret0"
}

Events

Each delivery is a POST to your URL with this body. status is the session status at the time of the event; signer_id and signer_reference are set on signer.* events and null on session.* events.

{
  "event_id": "evt_1d2e3f4a5b6c7d8e9f0a1b2c",
  "event_type": "signer.completed",
  "session_id": "qes_5f1c2a9e0b7d4c3a8e6f1b2c",
  "status": "signing",
  "reference": "contract-42",
  "signer_id": "sgn_0a1b2c3d4e5f6a7b8c9d0e1f",
  "signer_reference": "ceo",
  "occurred_at": "2026-10-15T10:09:40Z"
}
event_typeWhat to do
session.awaiting_documentRead the session for the identification, prepare the PDF and upload it.
session.signingIdentification mode only: the person identified and signing is open.
session.completedEvery signer signed. Read the session for the evidence and download the signed PDF.
session.failedRead failure_reason; with signer_failed, the failed signer's failure_reason.
session.cancelledThe session was cancelled. No further events follow for it.
session.expiredThe session reached expires_at before it finished.
signer.identifiedThis signer identified.
signer.signingThis signer's turn: send the person to their url. Nobody else notifies them.
signer.completedThis signer signed.
signer.failedThis signer failed; the session fails with it.

A session created with mode: identification sends session.* events only, no signer.* events; see QES identification.

The same event may arrive more than once: deduplicate on event_id.

Without a public webhook URL, for example in a local test, read the session with GET /qes-onboarding/sessions/{session_id} instead: every few seconds is fine. Prefer webhooks in production.

Answer with any 2xx. Other answers are retried with backoff, up to 8 attempts.

Verify the signature

Every delivery carries X-Signature: t=<unix seconds>,v1=<hex>. v1 is the HMAC-SHA256 of <t>.<raw body> with your signing secret. Compute it over the raw body as received, before parsing, and compare in constant time. t is taken when the delivery is sent, also on retries: reject a delivery whose t is more than 5 minutes from your clock.

Secret rotation. Setting the URL again returns a new secret. For 24 hours after that, deliveries carry two signatures in the one header, t=<unix seconds>,v1=<hex new>,v1=<hex old>, new first; accept a delivery when any v1 matches. After 24 hours only the new secret signs. Keep the old secret until then.

import crypto from 'node:crypto';

function verify(rawBody, header, secrets) {
  const parts = header.split(',').map((p) => p.split('='));
  const t = Number(parts.find(([k]) => k === 't')?.[1]);
  if (!Number.isFinite(t) || Math.abs(Date.now() / 1000 - t) > 300) return false;
  const given = parts.filter(([k]) => k === 'v1').map(([, v]) => Buffer.from(v, 'hex'));
  return secrets.some((secret) => {
    const expected = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest();
    return given.some((v) => v.length === expected.length && crypto.timingSafeEqual(v, expected));
  });
}

Pass the current secret, and during the 24 hours after a rotation the previous one as well.

On this page