{"id":834,"date":"2024-12-13T15:12:13","date_gmt":"2024-12-13T15:12:13","guid":{"rendered":"https:\/\/blog.zwitch.io\/?p=834"},"modified":"2025-05-27T02:41:15","modified_gmt":"2025-05-27T08:11:15","slug":"how-to-do-aadhaar-verification-with-zwitch-apis","status":"publish","type":"post","link":"https:\/\/www.zwitch.io\/blog\/how-to-do-aadhaar-verification-with-zwitch-apis\/","title":{"rendered":"How To Do Aadhaar Verification With Zwitch API"},"content":{"rendered":"\n<p>Confirming a customer\u2019s&nbsp;<strong>Aadhaar<\/strong>&nbsp;is essential for regulatory compliance and fraud prevention. This verification is vital in sectors such as finance and e-commerce, where online Aadhaar checks facilitate smooth Know Your Customer (KYC) processes. As businesses increasingly depend on digital solutions, incorporating an Aadhaar Verification API is essential for effective customer onboarding and secure operations.<\/p>\n\n\n\n<h2 id=\"why-aadhaar-verification-is-essential\" class=\"wp-block-heading\"><strong>Why Aadhaar Verification is Essential<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Regulatory compliance<\/strong>: Aadhaar verification ensures adherence to government-mandated KYC norms, protecting businesses from legal repercussions.<\/li>\n\n\n\n<li><strong>Fraud prevention<\/strong>: Validating Aadhaar helps prevent identity theft and ensures customer authenticity.<\/li>\n\n\n\n<li><strong>Trust building<\/strong>: Demonstrates a business\u2019s commitment to transparency, fostering trust with customers and stakeholders.<\/li>\n\n\n\n<li><strong>Operational efficiency<\/strong>: Aadhaar verification streamlines processes, reducing manual errors and expediting decision-making.<\/li>\n<\/ul>\n\n\n\n<p>By incorporating Aadhaar verification into your processes, your business can ensure compliance, improve security, and enhance customer trust.<\/p>\n\n\n\n<h2 id=\"benefits-of-aadhaar-verification-api\" class=\"wp-block-heading\"><strong>Benefits of Aadhaar Verification API<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Automation<\/strong>: The API automates Aadhaar verification, saving time and reducing manual errors.<\/li>\n\n\n\n<li><strong>Scalability<\/strong>: Handle high-volume verifications effortlessly as your business grows.<\/li>\n\n\n\n<li><strong>Flexibility<\/strong>: Easy integration into existing systems enables customized verification workflows.<\/li>\n\n\n\n<li><strong>Data security<\/strong>: Ensures compliance with privacy regulations while securing sensitive customer information.<\/li>\n<\/ul>\n\n\n\n<h2 id=\"automating-aadhaar-verification-with-zwitch-api\" class=\"wp-block-heading\"><strong>Automating Aadhaar Verification with Zwitch API<\/strong><\/h2>\n\n\n\n<p>Zwitch\u2019s Aadhaar Verification API simplifies and automates the process, offering businesses a reliable way to validate Aadhaar details. Below is a step-by-step guide for integrating Zwitch\u2019s Aadhaar Verification API.<\/p>\n\n\n\n<h3 id=\"step-1-setting-up-your-zwitch-account\" class=\"wp-block-heading\"><strong>Step 1: Setting Up Your Zwitch Account<\/strong><\/h3>\n\n\n\n<p>To begin, create an account with Zwitch. Once your account is set up and the required services are activated on your Zwitch dashboard, you\u2019ll receive API keys specific to your account. These keys act as your credentials for accessing the API.<\/p>\n\n\n\n<h3 id=\"step-2-authentication-and-authorization\" class=\"wp-block-heading\"><strong>Step 2: Authentication and Authorization<\/strong><\/h3>\n\n\n\n<p>Each API request must include a&nbsp;<strong>Bearer Token<\/strong>&nbsp;in the request header for secure access.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>Authorization: Bearer &lt;access-key:secret-key&gt;\n<\/code><\/code><\/pre>\n\n\n\n<p>This ensures that only authorized users can interact with the API.<\/p>\n\n\n\n<h3 id=\"step-3-sending-an-otp-for-aadhaar-verification\" class=\"wp-block-heading\"><strong>Step 3: Sending an OTP for Aadhaar Verification<\/strong><\/h3>\n\n\n\n<p>To initiate Aadhaar verification, you\u2019ll send a <strong>POST<\/strong> request to the Aadhaar OTP endpoint.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>POST &lt;https:\/\/api.zwitch.io\/v1\/kycs\/aadhaar\/otp&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>Required Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>aadhaar_number<\/strong>: The 12-digit Aadhaar number of the individual.<\/li>\n\n\n\n<li><strong>merchant_reference_id<\/strong>: A unique identifier for your reference.<\/li>\n\n\n\n<li><strong>consent:<\/strong> Consent of the individual to get their details from the Aadhaar database.<\/li>\n\n\n\n<li><strong>metadata<\/strong> (optional): Additional key-value pairs for tracking or analytics.<\/li>\n<\/ul>\n\n\n\n<p><strong>Here\u2019s an example request:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"consent\": true,\n  \"aadhaar_number\": \"395996370872\",\n  \"name\": \"John Doe\",\n  \"merchant_reference_id\": \"1000872\"\n}\n<\/code><\/pre>\n\n\n\n<p>This is the data you\u2019ll send to the API for verification. This triggers an OTP to the Aadhaar-linked mobile number and gives a response.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  **\"id\": \"adh_51dBvuiuTJXtkx7rmj8iUbf3p\"**,\n  \"type\": \"otp\",\n  \"object\": \"aadhaar_verification\",\n  \"aadhaar_number\": \"XXXXXXXX0872\",\n  \"name\": \"John Doe\",\n  \"message\": \"OTP sent to registered mobile number\",\n  \"status\": \"success\",\n  \"remark\": null,\n  \"merchant_reference_id\": \"1000872\",\n  \"consent\": true,\n  \"created_at\": 1678372025,\n  \"is_sandbox\": true\n}\n<\/code><\/pre>\n\n\n\n<h3 id=\"interpreting-the-response\" class=\"wp-block-heading\"><strong>Interpreting The Response<\/strong><\/h3>\n\n\n\n<p>Once you\u2019ve sent the request, the API will respond with a result. The response will tell you if the OTP was sent successfully or failed, along with other important information.<\/p>\n\n\n\n<p>The API will return a JSON response with the verification results. Key fields include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>id:<\/strong> Unique identifier of the Aadhaar verification request in the Zwitch database.<\/li>\n\n\n\n<li><strong>type:<\/strong> The type of verification you want to perform.<\/li>\n\n\n\n<li><strong>object:<\/strong> API object that is returned.<\/li>\n\n\n\n<li><strong>aadhaar_number:<\/strong> Aadhaar number that is being verified.<\/li>\n\n\n\n<li><strong>name:<\/strong> In the Send OTP API, this is the customer&#8217;s name that should be verified against the name linked to the Aadhaar number.<\/li>\n\n\n\n<li><strong>message:<\/strong> The result of the API call.<\/li>\n\n\n\n<li><strong>status:<\/strong> Status of the Send OTP request <code>success<\/code> or <code>failed<\/code><\/li>\n\n\n\n<li><strong>remark:<\/strong> Any remarks that may be required.<\/li>\n\n\n\n<li><strong>merchant_reference_id:<\/strong> Unique identifier entered when creating the verification request.<\/li>\n\n\n\n<li><strong>consent:<\/strong> Consent of the individual to get their details from the Aadhaar database.<\/li>\n\n\n\n<li><strong>created_at:<\/strong> Unix timestamp when Zwitch received the request.<\/li>\n\n\n\n<li><strong>is_sandbox:<\/strong> The mode in which the API was triggered.<\/li>\n<\/ul>\n\n\n\n<h3 id=\"step-4-download-aadhaar-details\" class=\"wp-block-heading\"><strong>Step 4: Download Aadhaar Details<\/strong><\/h3>\n\n\n\n<p>After receiving the OTP, validate it using another <strong>POST<\/strong> request to the Aadhaar OTP verification endpoint. Make sure to use the <strong>id<\/strong> in the above response in the endpoint:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;https:\/\/api.zwitch.io\/v1\/kycs\/aadhaar\/**{aadhaar_verification_id}**\/verify&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>Required Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>otp<\/strong>: The OTP received on the registered mobile number.<\/li>\n<\/ul>\n\n\n\n<p><strong>Example request:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"otp\": \"000000\"\n}\n<\/code><\/pre>\n\n\n\n<p>This above is the data you\u2019ll send to the API for verification. This triggers a request to verify the OTP and gives a response.<\/p>\n\n\n\n<p><strong>Success Response Example:<\/strong><\/p>\n\n\n\n<p>In case of a successful verification, the&nbsp;<strong>status<\/strong>&nbsp;field will say \u201csuccess,\u201d and the&nbsp;<strong>message<\/strong>&nbsp;field will describe <strong>\u201cAadhaar verified successfully\u201d<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"id\": \"adh_51dBvuiuTJXtkx7rmj8iUbf3p\",\n  \"object\": \"aadhaar_verification\",\n  \"message\": \"Aadhaar verified successfully\",\n  \"status\": \"success\",\n  \"name\": \"John Doe\",\n  \"aadhaar_number\": \"XXXXXXXX0872\",\n  \"date_of_birth\": \"2001-01-01\",\n  \"gender\": \"Male\",\n  \"father_name\": null,\n  \"address\": \"John Doe, 211B Baker Street, Bangalore - 560005\",\n  \"postal_code\": \"560035\",\n  \"state\": \"Karnataka\",\n  \"state_code\": \"KA\",\n  \"city\": \"bangalore urban\",\n  \"remark\": null,\n  \"merchant_reference_id\": \"1004370\",\n  \"consent\": true,\n  \"is_sandbox\": true\n}\n<\/code><\/pre>\n\n\n\n<p><strong>Failed Response Example:<\/strong><\/p>\n\n\n\n<p>In case of failure, the&nbsp;<strong>status<\/strong>&nbsp;field will say \u201cfailed,\u201d and the&nbsp;<strong>message<\/strong>&nbsp;field will describe why it failed. (e.g., \u201cInvalid OTP\u201d)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"id\": \"adh_51dBvuiuTJXtkx7rmj8iUbf3p\",\n  \"object\": \"aadhaar_verification\",\n  \"message\": \"Invalid OTP\",\n  \"status\": \"failed\",\n  \"aadhaar_number\": \"XXXXXXXX0000\",\n  \"father_name\": null,\n  \"remark\": null,\n  \"merchant_reference_id\": \"1000794\",\n  \"consent\": true,\n  \"is_sandbox\": true\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"error-handling\" class=\"wp-block-heading\"><strong>Error Handling<\/strong><\/h2>\n\n\n\n<p>If there\u2019s an issue with your request, you\u2019ll receive an error message to identify the problem.<\/p>\n\n\n\n<p><strong>401 Unauthorized<\/strong><\/p>\n\n\n\n<p>This means there\u2019s an issue with your API key or token. Make sure you\u2019ve included the correct&nbsp;<strong>Bearer Token<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"error\": {\n    \"type\": \"authentication_error\",\n    \"message\": \"Invalid secret key.\"\n  }\n}\n<\/code><\/pre>\n\n\n\n<p><strong>422 Unprocessable Entity<\/strong><\/p>\n\n\n\n<p>This indicates that one or more parameters in your request are incorrect or not formatted properly.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"error\": {\n    \"type\": \"invalid_request_error\",\n    \"code\": \"resource_missing\",\n    \"message\": \"no such id : adh_51dBvuiuTJXtkx7rmj8iUbf3p\",\n    \"param\": \"id\"\n  }\n}\n<\/code><\/pre>\n\n\n\n<h2 id=\"conclusion\" class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>Integrating Aadhaar verification through Zwitch\u2019s API ensures regulatory compliance, enhances security, and improves operational efficiency. By following this guide, you can seamlessly integrate Aadhaar verification into your system and streamline your onboarding processes.<\/p>\n\n\n\n<p>For more information, refer to the <a href=\"https:\/\/developers.zwitch.io\/reference\/verifications-aadhaar-otp\" target=\"_blank\" rel=\"noopener\">Zwitch Aadhaar Verification API Documentation<\/a>.<\/p>\n\n\n\n<div style=\"border: 2px solid #ff6600;padding: 20px;text-align: center;background-color: #f9f9f9;margin: 20px 0;font-family: 'Open Sans', sans-serif\">\n    <h2 id=\"interested-in-our-apis-lets-talk\" style=\"font-family: 'Open Sans', sans-serif;font-weight: 800\">Interested in our APIs? Let&#8217;s talk!<\/h2>\n    <p style=\"font-family: 'Open Sans', sans-serif\">Tell us your automation goals, and we\u2019ll set you up with a free, personalized demo from our API expert.<\/p>\n\n    <a href=\"https:\/\/form.typeform.com\/to\/b4t40yJ9?utm-source=zwitch-blog\" style=\"background-color: #ff6600;color: white;padding: 10px 20px;text-decoration: none;border-radius: 5px;font-family: &#039;Open Sans&#039;, sans-serif;font-weight: bold\" target=\"_blank\" rel=\"noopener\">Click Here<\/a>\n<\/div>\n\n\n\n<h2 id=\"faqs\" class=\"wp-block-heading\"><strong>FAQs<\/strong><\/h2>\n\n\n\n<h6 id=\"how-does-the-aadhaar-verification-api-benefit-businesses\" class=\"wp-block-heading\"><strong>How does the Aadhaar Verification API benefit businesses?<\/strong><\/h6>\n\n\n\n<p>It ensures compliance with KYC norms, prevents fraud, and streamlines onboarding processes through automation.<\/p>\n\n\n\n<h6 id=\"what-information-is-needed-for-aadhaar-verification\" class=\"wp-block-heading\"><strong>What information is needed for Aadhaar verification?<\/strong><\/h6>\n\n\n\n<p>The Aadhaar number, an OTP sent to the registered mobile number, and a merchant reference ID.<\/p>\n\n\n\n<h6 id=\"does-zwitch-provide-a-testing-environment\" class=\"wp-block-heading\"><strong>Does Zwitch provide a testing environment?<\/strong><\/h6>\n\n\n\n<p>Yes, you can use Zwitch&#8217;s sandbox environment to test API integrations before deploying live.<\/p>\n\n\n\n<h6 id=\"how-secure-is-the-aadhaar-verification-process\" class=\"wp-block-heading\"><strong>How secure is the Aadhaar verification process?<\/strong><\/h6>\n\n\n\n<p>The process is highly secure, adhering to authentication protocols and privacy regulations.<\/p>\n\n\n\n<h6 id=\"can-aadhaar-verification-api-handle-large-scale-verifications\" class=\"wp-block-heading\"><strong>Can Aadhaar Verification API handle large-scale verifications?<\/strong><\/h6>\n\n\n\n<p>Yes, the API is scalable and can manage high-volume verifications efficiently.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Streamline KYC with Zwitch&#8217;s Aadhaar Verification API. Ensure secure, automated, and compliant Aadhaar validation.<\/p>\n","protected":false},"author":7,"featured_media":890,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[63],"tags":[],"powerkit_post_featured":[],"class_list":{"0":"post-834","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-compliance"},"_links":{"self":[{"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/posts\/834","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/comments?post=834"}],"version-history":[{"count":1,"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/posts\/834\/revisions"}],"predecessor-version":[{"id":2061,"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/posts\/834\/revisions\/2061"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/media\/890"}],"wp:attachment":[{"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/media?parent=834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/categories?post=834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/tags?post=834"},{"taxonomy":"powerkit_post_featured","embeddable":true,"href":"https:\/\/www.zwitch.io\/blog\/wp-json\/wp\/v2\/powerkit_post_featured?post=834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}