API documentation
Webhooks
Receive signed webhook events for KYC sessions and workflow submissions and verify their signatures.
Set your webhook URL under Webhooks in the dashboard. We send a POST with a JSON body for each event.
Events
| Event | When |
|---|---|
kyc_session.authorized | Customer approved DigiLocker consent |
kyc_session.failed | Customer denied, or DigiLocker returned an error |
kyc_session.expired | The link wasn't used in time |
kyc_session.revoked | You revoked the session |
workflow_submission.completed | A hosted workflow submission finished |
webhook.test | You clicked "Send test event" |
Payload
{
"id": "evt_8f2k…",
"event": "kyc_session.authorized",
"created_at": "2026-11-19T10:02:41+05:30",
"data": { "session": { "id": "3f6c…", "status": "authorized", "reference_id": "CUST-1001", … } }
}
Verifying signatures
Each request has X-KycKaro-Event and X-KycKaro-Signature: t=<unix>,v1=<hex>. Compute HMAC-SHA256("<t>.<raw body>", signing_secret), compare it in constant time, and reject timestamps older than 5 minutes.
$payload = file_get_contents('php://input');
preg_match('/t=(\d+),v1=([a-f0-9]+)/', $_SERVER['HTTP_X_KYCKARO_SIGNATURE'] ?? '', $m);
$valid = $m
&& hash_equals(hash_hmac('sha256', $m[1].'.'.$payload, $secret), $m[2])
&& abs(time() - (int) $m[1]) <= 300;
More languages are covered in the webhook signature guide.
Retries
Return any 2xx status within 15 seconds. Otherwise we retry up to 5 times, after 30 seconds, 2 minutes, 10 minutes and 30 minutes. Events can arrive more than once, so de-duplicate using the event id.