> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhooks

> Subscribe to Cashfree KYC Link webhooks to track when customers open, complete, or fail verification journeys initiated through shareable KYC links.

Webhooks are event-based notifications that are received when a specific event related to the KYC verification occurs.

<Warning>
  In rare cases, such as network retries, read timeouts, processing delays, or delivery failures, the same webhook might be sent more than once for the same event. To prevent unintended side effects, implement idempotency in your webhook handler to handle duplicate deliveries.
</Warning>

## Add webhooks

Add your webhook URL in our system for us to deliver webhook events.

Follow the instructions below to configure the webhook URL. Ensure to provide the publicly accessible HTTPS URL to your webhook endpoint.

1. Log in to the **[Merchant Dashboard](https://merchant.cashfree.com/merchants/)** and click **Developers**.
2. Click **Webhooks** listed under the **Secure ID** card.
3. Click **Add Webhook URL** in the **Webhook** screen.
4. In the **Add Webhook** popup, fill in the following information:
   * **Webhook URL**: Enter the URL in this field.
5. Click **Test & Add Webhook**.

<Frame caption="Add Webhook">
  <img src="https://mintcdn.com/cashfreepayments-d00050e9/iGW1Vcgx_yo5v_1g/static/secure-id/webhook.png?fit=max&auto=format&n=iGW1Vcgx_yo5v_1g&q=85&s=d8662cc06a8874021806a0119209d58f" width="3424" height="1796" data-path="static/secure-id/webhook.png" />
</Frame>

***

## Webhook events

The following events are triggered at different stages of the KYC link process:

| Event                        | Description                                                                            |
| :--------------------------- | :------------------------------------------------------------------------------------- |
| KYC\_LINK\_ACTION\_PERFORMED | You will receive this event when one of the verifications is performed using the link. |
| KYC\_LINK\_SUCCESS           | You will receive this event when all the verifications are performed successfully.     |
| KYC\_LINK\_EXPIRED           | You will receive this event when the link expires.                                     |

<AccordionGroup>
  <Accordion title="KYC_LINK_ACTION_PERFORMED">
    ```json theme={"dark"}
    {
      "signature": "3YdAGMqBPDgWqy4zteRad/MoCmH59cm+93sogQWhOa8=",
      "event_type": "KYC_LINK_ACTION_PERFORMED",
      "event_time": "2024-02-15 16:53:15",
      "version": "v1",
      "data": {
        "name": "Test",
        "phone": "9999999999",
        "email": "test@cashfree.com",
        "verification_id": "testverificationid",
        "reference_id": 235461,
        "link_expiry": "2025-12-02",
        "form_link": "https://forms.cashfree.com/",
        "form_status": "RECEIVED",
        "verification_details": [
            {
                      "reference_id": 234,
              "type": "OFFLINE_AADHAAR_VERIFICATION",
              "status": "SUCCESS"
            },
            {
                      "reference_id": 0,
              "type": "PANDETAILS_VERIFICATION",
              "status": "RECEIVED"
        },
            {
              "reference_id": 0,
              "type": "BANKDETAILS_VALIDATION",
              "status": "RECEIVED"
            },
            {
              "reference_id": 0,
              "type": "UPIDETAILS_VALIDATION",
              "status": "RECEIVED"
            }
          ]
         }
    }
    ```
  </Accordion>

  <Accordion title="KYC_LINK_SUCCESS">
    ```json theme={"dark"}
    {
      "event_type": "KYC_LINK_SUCCESS",
      "event_time": "2024-02-15 16:53:15",
      "version": "v1",
      "data": {
        "name": "Test",
        "phone": "9999999999",
        "email": "test@cashfree.com",
        "verification_id": "testverificationid",
        "reference_id": 235461,
        "link_expiry": "2025-12-02",
        "form_link": "https://forms.cashfree.com/",
        "form_status": "SUCCESS",
        "verification_details": [
            {
                      "reference_id": 234,
              "type": "OFFLINE_AADHAAR_VERIFICATION",
              "status": "SUCCESS"
            },
            {
                      "reference_id": 235,
              "type": "PANDETAILS_VERIFICATION",
              "status": "SUCCESS"
        },
            {
              "reference_id": 236,
              "type": "BANKDETAILS_VALIDATION",
              "status": "SUCCESS"
            },
            {
              "reference_id": 237,
              "type": "UPIDETAILS_VALIDATION",
              "status": "SUCCESS"
            }
          ]
         }
    }
    ```
  </Accordion>

  <Accordion title="KYC_LINK_EXPIRED">
    ```json theme={"dark"}
    {
      "event_type": "KYC_LINK_EXPIRED",
      "event_time": "2024-02-15 16:53:15",
      "version": "v1",
      "data": {
        "name": "Test",
        "phone": "9999999999",
        "email": "test@cashfree.com",
        "verification_id": "testverificationid",
        "reference_id": 235461,
        "link_expiry": "2025-12-02",
        "form_link": "https://forms.cashfree.com/",
        "form_status": "EXPIRED",
        "verification_details": [
            {
                      "reference_id": 234,
              "type": "OFFLINE_AADHAAR_VERIFICATION",
              "status": "SUCCESS"
            },
            {
                      "reference_id": 0,
              "type": "PANDETAILS_VERIFICATION",
              "status": "EXPIRED"
        },
            {
              "reference_id": 236,
              "type": "BANKDETAILS_VALIDATION",
              "status": "SUCCESS"
            },
            {
              "reference_id": 0,
              "type": "UPIDETAILS_VALIDATION",
              "status": "EXPIRED"
            }
          ]
         }
    }
    ```
  </Accordion>
</AccordionGroup>

## Webhook signature

You will receive the webhook signature in the webhook header. Here is a sample header from a webhook request.

| Header name         |                 Header value                 |
| ------------------- | :------------------------------------------: |
| content-length      |                     1099                     |
| x-webhook-attempt   |                       1                      |
| content-type        |               application/json               |
| x-webhook-signature | 07r5C3VMwsGYeldGOCYxe5zoHhIN1zLfa8O0U/yngHI= |
| x-webhook-timestamp |                 1746427759733                |

<Tip> Always capture the webhook payload in its raw text format before parsing into JSON. Parsing and re-serialising the payload can change the structure (for example, array ordering, spacing, or `null` handling) and cause a signature mismatch during verification. Use the exact raw body string from the request when computing the signature.</Tip>

## Webhook payload fields

The webhook payload contains important metadata in its top-level fields.

| Field        | Type     | Description                                                                                   |
| ------------ | -------- | --------------------------------------------------------------------------------------------- |
| `event_type` | `string` | Indicates the type of event that triggered the webhook.                                       |
| `event_time` | `string` | The UTC timestamp of when the event occurred, formatted in ISO 8601 (`YYYY-MM-DDTHH:MM:SSZ`). |
| `version`    | `string` | Indicates the webhook format being used. Default version is "v1".                             |
| `data`       | `object` | Contains event-specific details related to this feature.                                      |

<Note>
  Verifying the signature is mandatory before processing any response. Refer to [Signature Verification](/api-reference/vrs/webhook-signature-verification) for more details.
</Note>
