Webhooks: Real-Time Event Dispatch & Security

Listen for asynchronous identity verifications, corporate KYB completions, and privacy consent updates. Every payload is cryptographically signed with HMAC-SHA256 and backed by exponential backoff retries.

HMAC-SHA256 Non-Repudiation

All POST requests include the x-useoneid-signature header. Verify payloads with constant-time equality checks against your secret key to guarantee authenticity.

x-useoneid-signature: sha256=9a8bc43d... ✓ Verified Origin
At-Least-Once Delivery & Retry Policy

If your endpoint returns a non-2xx status code or times out after 10 seconds, UseOneID automatically retries with exponential backoff over 72 hours (1m, 5m, 15m, 1h, 6h, 24h).

HTTP 200 OK Response ➔ Delivery Acknowledged

Live HMAC Signature Verification Simulator

Test how your server computes and validates the webhook signature

HMAC-SHA256

Webhook Events Catalog

Subscribe to specific event scopes inside your Partner Console

identity.verified(KYC / Onboarding)

Fired immediately when a citizen completes biometric liveness and government identity verification.

{
  "event": "identity.verified",
  "timestamp": "2026-10-12T18:00:00Z",
  "data": {
    "session_id": "sess_live_9a8b7c",
    "user_id": "usr_78a1bc",
    "tier": "Tier 2",
    "full_name": "Sample subject",
    "nin_hash": "a8f9c1...83d"
  }
}

Integration Snippets

Drop-in HMAC verification helpers in your backend framework

Node.js (Express) Verification
const crypto = require("crypto");

// Express / Node.js webhook verification handler
app.post("/api/v1/webhooks/useoneid", (req, res) => {
  const signature = req.headers["x-useoneid-signature"];
  const secret = process.env.USEONEID_WEBHOOK_SECRET;

  const expectedSignature = "sha256=" + crypto
    .createHmac("sha256", secret)
    .update(JSON.stringify(req.body))
    .digest("hex");

  if (!crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expectedSignature))) {
    return res.status(401).send("Invalid HMAC Signature");
  }

  const { event, data } = req.body;
  if (event === "identity.verified") {
    console.log("Verified Citizen Onboarded:", data.full_name);
  }

  res.status(200).json({ received: true });
});