Menu
Results
Webhooks
Setup
- Webhook URL: Panel → My profile (optionally
sandbox_webhook_urlfor sandbox events). It must be a public address; use HTTPS. - Signing secret: Panel → Webhooks & keys → generate (
whsec_…). It is shown once; generating a new one replaces it immediately. - Test it:
POST /v1/webhooks/testsends one signed request to any URL you give. - Both are required. Without a signing secret nothing is sent: the delivery is marked
failedand not retried, because we never send unsigned requests. A URL that is not public (private network, localhost) is alsofailedwithout retries. Without a URL nothing is recorded at all. Sandbox events use your main URL ifsandbox_webhook_urlis not set.
Signature verification (required)
X-Signature: t=<unix>,v1=<hex>. v1 is HMAC-SHA256 with your webhook_secret over "<t>." followed by the raw request body. Compare in constant time and reject a t more than 5 minutes away.
// Headers
X-Signature: t=1762950000,v1=5f2b…
X-Event-Id: a1b2c3d4-… // same as event_id in the body, unchanged across retries
X-Event-Type: session.approved# Python
import hashlib, hmac, time
def verify(raw_body: bytes, header: str | None, secret: str) -> bool:
try:
parts = dict(p.split("=", 1) for p in (header or "").split(","))
t = int(parts["t"])
except (KeyError, ValueError):
return False
if abs(time.time() - t) > 300: # 5 min: rejects a replayed old request
return False
signed = f"{t}.".encode() + raw_body # the raw bytes: do not re-serialise the JSON
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
return hmac.compare_digest(parts.get("v1", ""), expected)// Node.js (pass the raw body, e.g. express.raw({ type: "application/json" }))
import crypto from "node:crypto";
export function verify(rawBody, header, secret) {
const parts = Object.fromEntries((header ?? "").split(",").map((p) => p.split("=", 2)));
const t = Number(parts.t);
if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > 300) return false; // 5 min: rejects a replayed old request
const expected = crypto.createHmac("sha256", secret).update(`${t}.`).update(rawBody).digest("hex");
const got = Buffer.from(parts.v1 ?? "", "utf8");
return got.length === expected.length && crypto.timingSafeEqual(got, Buffer.from(expected, "utf8"));
}Delivery
- Success = your endpoint answers 2xx within 10 s. Redirects (3xx) are not followed and count as failures.
- Failures are retried after 30 s, 1 min, 5 min, 15 min and 1 h (6 attempts in total), then marked
failed.GET /v1/webhooks/deliverieslists them. - The same event can arrive twice: store
X-Event-Idand ignore repeats. - Order is not guaranteed: use
occurred_at(when the event happened;tis the send time and changes on retries) to ignore an older event that arrives after a newer one. - Answer quickly and do the work asynchronously; for a missed or doubtful event, fetch
GET /v1/sessions/{id}. - Requests come with
Content-Type: application/jsonandUser-Agent: IDotta-Webhooks/1.0. The signature is made when each attempt is sent: after you generate a new secret, retries still pending are signed with the new one.
Example payload
{
"event_type": "session.approved",
"event_id": "a1b2c3d4-…",
"session_id": "550e8400-…",
"applicant_external_id": "user-42",
"occurred_at": "2026-11-16T10:42:07.513Z",
"status": "approved",
"status_label": "Approved",
"step": "approved",
"environment": "production",
"affiliate_id": "spring-campaign",
"click_id": null,
"decision": { "decided_by": "auto", "document_score": 91.0, "checks": [ … ], "warnings": [] }
}Every session event carries applicant_external_id (yours, or null), occurred_at, environment, status, status_label, step, affiliate_id and click_id (yours, or null) and decision (null until there is one); contact_verification is added when you asked for verify_contact. decision.signals and decision.risk are described on Verification statuses.
Ignore fields you do not know. We add fields to responses and webhooks without a new API version; we never remove or rename one within /v1. Parse leniently, and do not fail on an unknown event_type either: acknowledge it with 2xx.
| EVENT | WHEN |
|---|---|
| session.approved | Approval: automatic, analyst or reuse (reused: true), or an analyst reversing a decline |
| session.rejected | Decline (status: declined): analyst, no retries left, time ran out with retries left, or an analyst reversing an approval |
| session.manual_review | The session went to human review (status: in_review) |
| session.expired | Time ran out: status: expired (never started) or abandoned (started, did not finish). A session in review does not expire |
| session.resubmitted | An analyst asked for step(s) to be redone (resubmit_info); send the user a new link with POST /v1/sessions/{id}/sdk-link |
| session.kyc_expired | An approval reached 365 days (status: kyc_expired); checked once a day |
| document.verified | The document passed and the flow continues with liveness. Not sent when modules is ["document"]: the session is approved directly (session.approved) |
| document.rejected | The document failed: status: in_progress = the user can retry, declined = final (session.rejected follows) |
| document.review_required | The document needs a human; the flow usually continues with liveness and session.manual_review follows |
| liveness.passed | Liveness passed (a step event; the decision follows in session.*) |
| liveness.failed | Liveness failed (same status rule as document.rejected) |
| applicant.aml_alert | Ongoing monitoring (optional module): a new sanctions or PEP match for an approved applicant. A different body (below): no session_id, no occurred_at, no status |
| test.ping | Sent by the webhook test (panel or API) |
applicant.aml_alert
{
"event_type": "applicant.aml_alert",
"event_id": "…",
"applicant_external_id": "user-42",
"environment": "production",
"new_match_count": 1,
"top_match": { "source": "ofac", "score": 92, "programs": ["…"] }
}The only event without a session: route it on event_type before reading session_id. top_match says which list matched and how closely; it carries no name. Review the matched entry in Panel → AML.