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

# 4. Run Verification Actions

> Verify OTPs, CKYC, DigiLocker, UPI and video KYC using Razorpay Onboarding APIs.

Available in
🇮🇳 India

Some steps need the sub-merchant to act outside your form: enter a One-Time Password (OTP), or finish a DigiLocker, UPI or video KYC flow. Start these with [Run an Action](https://razorpay.com/docs/api/partners/accounts/run-action.md).

A requirement with `requirement_type` `action` names the action to run in its `requirement_code`. You never infer an OTP from a data field. An action never changes the account. Its outputs come back in the response's `metadata` as type and value pairs. Its `requirements` list what is due next, exactly as the account's requirements show it.

The table below lists the actions:

| Action | What It Does | Requirements in Its Response | What You Do Next |
| - | - | - | - |
| `send_phone_otp`, `send_email_otp` | Sends an OTP to the user's phone or email. Its `metadata` returns `sent_to` and `expires_at`. | `phone_otp` or `email_otp` (input) | Send the code at the top level of an [update](https://razorpay.com/docs/api/partners/accounts/update.md). |
| `send_ckyc_otp` | Sends the Central KYC Records Registry (CKYC) code to the mobile on the person's CKYC record. Its `metadata` returns `sent_to`, `expires_at` and `request_id`. | `ckyc_otp` and `ckyc_request_id` (input) | Send both in an update, as `otp` and `request_id` on `individual_ckyc`. |
| `create_aadhaar_digilocker_link` | Mints a DigiLocker link. Send `metadata.return_url`. Its `metadata` returns the link as `url`, with `expires_at`. | `create_aadhaar_digilocker_link` (action), still due | Show the link. The sub-merchant signs in and shares their Aadhaar. |
| `create_upi_link` | Mints a ₹1 UPI link. Its `metadata` returns the link as `url`, with `expires_at`. | `create_upi_link` (action), still due | Show the link. The sub-merchant pays ₹1 from the account, and Razorpay refunds it. |
| `create_video_kyc_link` | Mints a video KYC link while the product is `edd_pending`. Its `metadata` returns the link as `url`, with `expires_at`. | `create_video_kyc_link` (action), still due | Show the link. The sub-merchant completes a short call. |

## 4.1 Send an OTP

Run `send_phone_otp` or `send_email_otp` when it is due. The body is optional for these actions.

`POST /v1/accounts/{account_id}/actions/{action}`

```bash Curl theme={null}
curl -X POST https://api.razorpay.com/v1/accounts/acc_TcdGEzmfKQzEl1/actions/send_phone_otp \
-u rzp_test_partner_[CLIENT_ID]:[CLIENT_SECRET] \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: [UNIQUE_KEY]"
```

```json Response theme={null}
{
  "action": "send_phone_otp",
  "status": "completed",
  "metadata": [
    {
      "type": "sent_to",
      "value": "XXXXXX2201"
    },
    {
      "type": "expires_at",
      "value": 1792433435
    }
  ],
  "requirements": [
    {
      "id": "req_frQIr1drWracQB",
      "requirement_code": "phone_otp",
      "requirement_level": "mandatory",
      "requirement_type": "input",
      "description": "Enter the code sent to your phone.",
      "field_path": "phone_otp",
      "value_type": "text",
      "status": "created"
    }
  ],
  "error": null
}
```

Ask the sub-merchant for the code and send it at the top level of an update:

`PATCH /v1/accounts/{account_id}`

```bash Curl theme={null}
curl -X PATCH https://api.razorpay.com/v1/accounts/acc_TcdGEzmfKQzEl1 \
-u rzp_test_partner_[CLIENT_ID]:[CLIENT_SECRET] \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: [UNIQUE_KEY]" \
-d '{
  "phone_otp": "482913"
}'
```

A wrong code returns `200` with the code still due. An expired code, or 3 wrong tries, brings the send action back. To send a new OTP, run the action again with a new idempotency key.

## 4.2 Mint a Link

Run `create_aadhaar_digilocker_link` or `create_upi_link` when it is due. DigiLocker needs a `return_url` in `metadata`.

`POST /v1/accounts/{account_id}/actions/{action}`

```bash Curl theme={null}
curl -X POST https://api.razorpay.com/v1/accounts/acc_TcdGEzmfKQzEl1/actions/create_aadhaar_digilocker_link \
-u rzp_test_partner_[CLIENT_ID]:[CLIENT_SECRET] \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: [UNIQUE_KEY]" \
-d '{
  "metadata": {
    "return_url": "https://shop.example.com/rzp/aadhaar-done"
  }
}'
```

```json Response theme={null}
{
  "action": "create_aadhaar_digilocker_link",
  "status": "completed",
  "metadata": [
    {
      "type": "url",
      "value": "https://digilocker.razorpay.com/authorize?session=dl_7Gh2Kq9Lm4Pw"
    },
    {
      "type": "expires_at",
      "value": 1792437300
    }
  ],
  "requirements": [
    {
      "id": "req_8Z7cOzH9RmInpe",
      "requirement_code": "create_aadhaar_digilocker_link",
      "requirement_level": "mandatory",
      "requirement_type": "action",
      "description": "Share your Aadhaar from DigiLocker to verify your address.",
      "status": "created"
    }
  ],
  "error": null
}
```

A link appears only in the response of the action that minted it, so keep the link from the response.

The action stays due while the sub-merchant completes the step. It clears by itself once Razorpay has the outcome, with the `account.requirements.updated` webhook. To show the link again, or when it expires or the step fails, run the action again for a new link.

> [accordion] Request Parameters
>
> `metadata.return_url` *mandatory for `create_aadhaar_digilocker_link`*
> : `string` The https URL the sub-merchant returns to after DigiLocker. For example, `https://shop.example.com/rzp/aadhaar-done`.
>
> `metadata.ckyc_mobile` *optional for `send_ckyc_otp`*
> : `string` The mobile on the CKYC record, +91 followed by 10 digits. A number that is not the mobile on the record returns `status: failed`.

Refer to [Run an Action](https://razorpay.com/docs/api/partners/accounts/run-action.md) for every parameter and error.

## 4.3 Complete Video KYC

You never report the outcome of a video KYC call yourself. When video KYC is needed, usually after submission without a CKYC record, the product moves to `edd_pending`. Its one requirement is the `create_video_kyc_link` action.

Run it to get the link in the response's `metadata`:

`POST /v1/accounts/{account_id}/actions/{action}`

```bash Curl theme={null}
curl -X POST https://api.razorpay.com/v1/accounts/acc_TcdGEzmfKQzEl1/actions/create_video_kyc_link \
-u rzp_test_partner_[CLIENT_ID]:[CLIENT_SECRET] \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: [UNIQUE_KEY]"
```

```json Response theme={null}
{
  "action": "create_video_kyc_link",
  "status": "completed",
  "metadata": [
    {
      "type": "url",
      "value": "https://vkyc.razorpay.com/start?session=vk_3Rt8Lq2Zp6Wn"
    },
    {
      "type": "expires_at",
      "value": 1792607400
    }
  ],
  "requirements": [
    {
      "id": "req_bmOw79SOmj6jEj",
      "requirement_code": "create_video_kyc_link",
      "requirement_level": "mandatory",
      "requirement_type": "action",
      "description": "Complete a short video call with a Razorpay agent to verify your identity and address. Keep your PAN card on hand.",
      "status": "created"
    }
  ],
  "error": null
}
```

Once the call is done, the product moves to `under_review`, then to `activated` or `rejected`. Each change comes back on the product's `status` and `requirements`, and through [webhooks](https://razorpay.com/docs/webhooks/partners/onboarding-apis.md).

## 4.4 Handle Action Failures

The table below lists how an action can fail:

| Response | When | What You Do |
| - | - | - |
| `200` with `status: failed` | The action ran, but the registry or bank answered that it cannot be done. For example, a `ckyc_mobile` that is not the mobile on the CKYC record. `error` says why, and `requirements` list what is due instead. | Show the reason and answer the requirements listed. |
| `503 provider_unavailable` | The provider behind the action did not answer. This can be the registry, the bank or the SMS or email service. Nothing ran. | Retry after `Retry-After`. |
| `429 rate_limited` | The same action ran more than 5 times in an hour on the account. Every OTP send counts. | Retry after `Retry-After`. |
| `400 step_not_due` | Nothing the action serves is due. For example, `send_ckyc_otp` before the PAN is verified, or `create_video_kyc_link` outside `edd_pending`. | Run only the actions the requirements list. |

## 4.5 Fetch KYC From CKYC

CKYC verifies the person and fills their proof of address from their CKYC record. It applies to these people:

* An individual
* A proprietor
* The authorised person of a private limited, public limited or Section 8 company

In live mode, the code goes to the mobile on the CKYC record. To fetch the record, follow these steps:

1. Once the PAN verifies and Razorpay finds a CKYC record for it, the `ckyc_fetch` composite requirement is due. To skip CKYC, send `true` at `business_profile.authorized_person.identity_numbers.individual_ckyc.is_skipped`.
2. Otherwise, run `send_ckyc_otp`. Its `metadata` returns `sent_to`, `expires_at` and `request_id`. Its `requirements` list `ckyc_otp` and `ckyc_request_id`.
3. Ask the sub-merchant for the 6-digit code. Send it as `otp`, with the request ID as `request_id`, on `individual_ckyc` in an [update](https://razorpay.com/docs/api/partners/accounts/update.md).

`POST /v1/accounts/{account_id}/actions/{action}`

```bash Curl theme={null}
curl -X POST https://api.razorpay.com/v1/accounts/acc_TcdGEzmfKQzEl1/actions/send_ckyc_otp \
-u rzp_test_partner_[CLIENT_ID]:[CLIENT_SECRET] \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: [UNIQUE_KEY]" \
-d '{
  "metadata": {
    "ckyc_mobile": "+919845098450"
  }
}'
```

```json Response theme={null}
{
  "action": "send_ckyc_otp",
  "status": "completed",
  "metadata": [
    {
      "type": "sent_to",
      "value": "XXXXXX8450"
    },
    {
      "type": "expires_at",
      "value": 1792433590
    },
    {
      "type": "request_id",
      "value": "CKYCREQ20261115000123"
    }
  ],
  "requirements": [
    {
      "id": "req_57W5G6wcHziGOP",
      "requirement_code": "ckyc_otp",
      "requirement_level": "mandatory",
      "requirement_type": "input",
      "description": "Enter the code sent to the mobile on your CKYC record.",
      "field_path": "business_profile.authorized_person.identity_numbers.individual_ckyc.otp",
      "value_type": "text",
      "status": "created"
    },
    {
      "id": "req_mKVNnArZtTaL0M",
      "requirement_code": "ckyc_request_id",
      "requirement_level": "mandatory",
      "requirement_type": "input",
      "description": "The request ID that came with the code.",
      "field_path": "business_profile.authorized_person.identity_numbers.individual_ckyc.request_id",
      "value_type": "text",
      "status": "created"
    }
  ],
  "error": null
}
```

`PATCH /v1/accounts/{account_id}`

```bash Curl theme={null}
curl -X PATCH https://api.razorpay.com/v1/accounts/acc_TcdGEzmfKQzEl1 \
-u rzp_test_partner_[CLIENT_ID]:[CLIENT_SECRET] \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: [UNIQUE_KEY]" \
-d '{
  "business_profile": {
    "authorized_person": {
      "identity_numbers": {
        "individual_ckyc": {
          "otp": "308217",
          "request_id": "CKYCREQ20261115000123"
        }
      }
    }
  }
}'
```

```json Response theme={null}
{
  "id": "acc_TcdGEzmfKQzEl1",
  "country": "IN",
  "statement_descriptor": null,
  "is_mfa_enabled": false,
  "user": {
    "role": "owner",
    "email": "gaurav.kumar@example.com",
    "phone": "+919611752201",
    "name": "Gaurav Kumar",
    "is_email_verified": true,
    "is_phone_verified": true
  },
  "business_profile": {
    "business_type": "individual",
    "business_name": "GAURAV KUMAR",
    "date_of_establishment": null,
    "identity_numbers": {},
    "documents": {},
    "business_category": null,
    "authorized_person": {
      "name": "GAURAV KUMAR",
      "identity_numbers": {
        "individual_pan": {
          "type": "individual_pan",
          "value": "ABCPD1234A",
          "verification": {
            "status": "verified",
            "error_code": null,
            "error_description": null,
            "verified_at": 1792433290,
            "metadata": {},
            "created_at": 1792433290
          },
          "metadata": {},
          "is_skipped": false,
          "created_at": 1792433280,
          "updated_at": 1792433290
        },
        "individual_ckyc": {
          "type": "individual_ckyc",
          "value": null,
          "verification": {
            "status": "verified",
            "error_code": null,
            "error_description": null,
            "verified_at": 1792433340,
            "metadata": {},
            "created_at": 1792433340
          },
          "metadata": {
            "ckyc_mobile": "+919845098450"
          },
          "is_skipped": false,
          "created_at": 1792433340,
          "updated_at": 1792433340
        }
      },
      "documents": {
        "aadhaar_front": {
          "id": "file_Hx7Ui2kQe9Zf3A",
          "type": "aadhaar_front",
          "url": "https://files.razorpay.com/documents/file_Hx7Ui2kQe9Zf3A",
          "metadata": {
            "source": "ckyc",
            "file_name": "aadhaar-front.jpg",
            "mime_type": "image/jpeg",
            "size_bytes": 187342
          },
          "verification": {
            "status": "verified",
            "error_code": null,
            "error_description": null,
            "verified_at": 1792433340,
            "metadata": {},
            "created_at": 1792433340
          },
          "created_at": 1792433340
        }
      },
      "address": null,
      "date_of_birth": null,
      "additional_data": {},
      "created_at": 1792433280,
      "updated_at": 1792433340
    },
    "stakeholders": {},
    "addresses": [],
    "metadata": {}
  },
  "bank_accounts": {},
  "products": {
    "payment_gateway": {
      "type": "payment_gateway",
      "status": "in_progress",
      "status_reason": null,
      "created_at": 1792433135,
      "updated_at": 1792433340,
      "requirements": [
        {
          "id": "req_yD8JfNtIoWXmu4",
          "requirement_code": "statement_descriptor",
          "requirement_level": "mandatory",
          "requirement_type": "input",
          "description": "The name shown on customers' receipts and statements.",
          "field_path": "statement_descriptor.value",
          "value_type": "text",
          "status": "created"
        },
        {
          "id": "req_VgRHb7QJNtMyj2",
          "requirement_code": "settlement_bank_account",
          "requirement_level": "mandatory",
          "requirement_type": "composite",
          "description": "The bank account that receives settlements, in the name on your PAN.",
          "fulfillment_criteria": "all_of",
          "sub_requirements": [
            {
              "id": "req_4rY5OIDnOHtA2z",
              "requirement_code": "bank_account_number",
              "requirement_level": "mandatory",
              "requirement_type": "input",
              "description": "The account number.",
              "field_path": "bank_accounts.settlements_primary.account_number",
              "value_type": "text",
              "status": "created"
            },
            {
              "id": "req_mOTextgE1uJfFK",
              "requirement_code": "bank_routing_code",
              "requirement_level": "mandatory",
              "requirement_type": "input",
              "description": "The bank's IFSC.",
              "field_path": "bank_accounts.settlements_primary.routing_code",
              "value_type": "text",
              "status": "created"
            },
            {
              "id": "req_GNDdQcckulAU4g",
              "requirement_code": "bank_routing_code_type",
              "requirement_level": "mandatory",
              "requirement_type": "input",
              "description": "The kind of routing code.",
              "field_path": "bank_accounts.settlements_primary.routing_code_type",
              "value_type": "enum",
              "options": [
                {
                  "label": "IFSC",
                  "value": "IFSC"
                }
              ],
              "status": "created"
            }
          ],
          "status": "created"
        },
        {
          "id": "req_7zAE2YmS5MDUhG",
          "requirement_code": "business_category",
          "requirement_level": "mandatory",
          "requirement_type": "input",
          "description": "Select your business category, and send its subcategory with it.",
          "field_path": "business_profile.business_category.category",
          "value_type": "enum",
          "options": [
            {
              "label": "Ecommerce",
              "value": "ecommerce"
            },
            {
              "label": "Food and beverage",
              "value": "food"
            }
          ],
          "status": "created"
        },
        {
          "id": "req_0HAQYzBrDRNnEM",
          "requirement_code": "accept_terms_of_service",
          "requirement_level": "mandatory",
          "requirement_type": "composite",
          "description": "Show the sub-merchant Razorpay's terms of service and record their acceptance.",
          "fulfillment_criteria": "all_of",
          "sub_requirements": [
            {
              "id": "req_CTW6xxsQmygIDU",
              "requirement_code": "acceptance_ip",
              "requirement_level": "mandatory",
              "requirement_type": "input",
              "description": "The IP address the terms were accepted from.",
              "field_path": "products.payment_gateway.terms_of_service_acceptance.ip",
              "value_type": "text",
              "status": "created"
            },
            {
              "id": "req_gXg6igx2STKrZA",
              "requirement_code": "acceptance_device_fingerprint_id",
              "requirement_level": "mandatory",
              "requirement_type": "input",
              "description": "The device fingerprint of the device the terms were accepted on.",
              "field_path": "products.payment_gateway.terms_of_service_acceptance.device_fingerprint_id",
              "value_type": "text",
              "status": "created"
            }
          ],
          "status": "created"
        }
      ],
      "terms_of_service_acceptance": null,
      "payment_channels": {
        "website": {
          "primary": "https://www.example.com",
          "additional": [],
          "verification": {
            "status": "verified",
            "error_code": null,
            "error_description": null,
            "verified_at": 1792433250,
            "metadata": {},
            "created_at": 1792433220
          }
        },
        "app_android": null,
        "app_ios": null
      },
      "clarification_responses": {}
    }
  },
  "notes": {
    "shop_id": "60291847"
  },
  "created_at": 1792433135,
  "updated_at": 1792433340
}
```

> [accordion] Request Parameters
>
> `business_profile.authorized_person.identity_numbers.individual_ckyc.otp` *optional*
> : `string` The 6-digit code sent to the mobile on the CKYC record. Send it with `request_id`. For example, `308217`.
>
> `business_profile.authorized_person.identity_numbers.individual_ckyc.request_id` *optional*
> : `string` The request ID from the `send_ckyc_otp` response. Send it with `otp`. For example, `CKYCREQ20261115000123`.

Once verified, the record fills the proof of address. It also fills the registered and operational addresses when you have not sent them. The account shows the CKYC record at `business_profile.authorized_person.identity_numbers.individual_ckyc` with these fields:

* **`value`:** `null`.
* **`metadata`:** The `ckyc_mobile`, the mobile number on the CKYC record.
* **`verification`:** The outcome of the check.

The documents it filled show as verified, and the requirements clear. The response does not return `otp` or `request_id`.

> [!NOTE]
>
> **Handy Tips**
>
> A wrong code leaves `ckyc_otp` and `ckyc_request_id` due. Send the corrected code with the same request ID. To send the code again, run `send_ckyc_otp` and use the new request ID. The earlier code then stops working.

Skipping CKYC, or a PAN with no CKYC record, makes the `proof_of_address_for_individual` composite requirement due instead. Answer it with DigiLocker through `create_aadhaar_digilocker_link`, or both sides of an Aadhaar, passport or voter ID. Know more about [composite requirements](https://razorpay.com/docs/partners/aggregators/onboarding-api/collect-requirements.md#2-2-composite-requirements). Without a CKYC record, a video KYC call can also be due after submission.

## Next Step

[Accept Terms and Submit](https://razorpay.com/docs/partners/aggregators/onboarding-api/accept-terms.md)
