Skip to content
veriffy
RUEN

Webhooks

VERIFFY tells your server about events by itself — above all about the decision on a verification. You do not need to poll the API.

Add an endpoint

In the dashboard open Manage → Webhooks and add your server's address. The live and sandbox environments have separate endpoints.

The same through the API:

Shell
curl https://api.veriffy.me/v1/webhooks/endpoints \
  -H "Authorization: Bearer $VERIFFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/hooks/veriffy", "events": ["verification.decided"]}'
Field Description
url A public https address. Internal and private addresses are refused
events Which events to send. An empty list means all
description A note for yourself

The response contains a secret — the secret for verifying the signature. Save it in your server's settings.

You can also set an address for one verification: the callback_url field when creating a verification. Those webhooks are signed with the organisation's secret, returned by GET /v1/webhooks/secret.

Events

Event When it arrives
verification.started The user opened the page and gave consent
verification.submitted The user completed all steps
verification.decided A decision is made. Arrives again if the decision changes
verification.expired The verification expired
applicant.monitoring_hit A repeated watchlist screening found a match for an already verified applicant
applicant.erased The applicant's data was erased

What arrives

A POST request with JSON in the body:

JSON
{
  "id": "0d6e4f1a-3b7c-4c2d-9e55-1f0a2b3c4d5e",
  "type": "verification.decided",
  "created_at": "2026-12-06T10:03:11.482913+00:00",
  "environment": "live",
  "data": {
    "session_id": "6f1d0c9e-4a55-4d0e-9a57-0f3b2c1d7e10",
    "applicant_id": "0b9c2f6a-…",
    "external_user_id": "user-42",
    "level": "kyc-full",
    "status": "approved",
    "attempt": 1,
    "decision": {
      "status": "approved",
      "reject_type": null,
      "reason_codes": [],
      "resubmission_steps": [],
      "risk_score": 3.0,
      "decided_by": "auto",
      "decided_at": "2026-12-06T10:03:11+00:00"
    },
    "metadata": {"order": "A-1001"}
  }
}

A webhook carries no personal data. If you need it, request it separately: GET /v1/sessions/{id}?include=extracted.

Request headers:

Header Description
Veriffy-Signature The signature: t=<time>,v1=<signature>
Veriffy-Event-Id The event's id. The same on repeated deliveries
Veriffy-Event-Type The event type
Veriffy-Delivery-Id The id of this delivery attempt

Verify the signature

The signature proves that VERIFFY sent the request and that nobody changed it on the way. It is an HMAC-SHA256 of the string <t>.<request body> with your secret.

Important: the signature is computed over the request body exactly as it arrived — before the JSON is parsed.

import hashlib
import hmac
import time

def verify(secret: str, header: str, body: bytes, tolerance: int = 300) -> bool:
    try:
        parts = dict(p.split("=", 1) for p in header.split(","))
        ts = int(parts["t"])
    except (KeyError, ValueError):
        return False
    if abs(time.time() - ts) > tolerance:          # an old request may be a replay
        return False
    expected = hmac.new(secret.encode(), f"{ts}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))

A complete handler:

Node.js, Express
app.post('/hooks/veriffy', express.raw({ type: 'application/json' }), async (req, res) => {
  if (!verify(process.env.VERIFFY_WEBHOOK_SECRET, req.get('Veriffy-Signature') || '', req.body)) {
    return res.sendStatus(400);
  }
  const event = JSON.parse(req.body);
  if (await alreadyHandled(req.get('Veriffy-Event-Id'))) return res.sendStatus(200);

  if (event.type === 'verification.decided') {
    await saveDecision(event.data.external_user_id, event.data.status, event.created_at);
  }
  res.sendStatus(200);
});

Response and retries

Answer with a 2xx code within 10 seconds. Do long work after you have answered.

If there is no response or the code is different, the delivery is retried: after 1 minute, 5 minutes, 15 minutes, 1 hour, 3 hours, 6 hours, 12 hours and 24 hours.

An event can arrive twice

Delivery is "at least once". Remember the Veriffy-Event-Id of handled events and skip repeats.

Delivery history

The Webhooks page in the dashboard shows every attempt: the response code, the time and the error text. A failed delivery can be sent again.

Method What it does
GET /v1/webhooks/deliveries List deliveries
POST /v1/webhooks/deliveries/{id}/redeliver Send again
POST /v1/webhooks/endpoints/{id}/rotate-secret Issue a new secret for an endpoint
DELETE /v1/webhooks/endpoints/{id} Delete an endpoint

Start typing: a section name, a parameter or an error code

↑↓ selectEnter openEsc close