Docs

Aadhaar eKYC Verify OTP API

Verifies the OTP sent to the Aadhaar-linked mobile number and returns the KYC details.
BODY PARAMS

RAW_BODY
json

HEADERS

📘
Request headers

Accept : application/json
Content-Type: application/json

Request Parameters
Send these parameters in the request body:

Parameter Type Position # Description
token string RAW_BODY Required Your API token from the ClubApi dashboard. Send it with every API request and keep it private.
aadhaarNumber string RAW_BODY Required Customer's Aadhaar number.
otp string RAW_BODY Required Otp.
aadhaarMobile string RAW_BODY Optional Customer's Aadhaar-linked mobile number. If you send it, we compare it with the number linked to Aadhaar and return mobileMatched=1 in the verification API when they match.
otpSessionId string RAW_BODY Optional Session ID returned by the Send OTP API.


Response
These fields are returned in the response:

Parameter Type Description
status string Request status: SUCCESS or FAILED.
data string KYC details of the customer.

              
              {
  "orderId": "24060920131xxxxxx",
  "status": "SUCCESS",
  "aadhaarData": {
    "fullName": "Deep xxxxx",
    "maskedAadhaar": "xxxxxxxx4253",
    "dob": "2001-09-05",
    "gender": "M",
    "address": {
      "country": "India",
      "district": "Raipur",
      "state": "Chhattisgarh",
      "post": "Raipur",
      "location": "xxxx",
      "vtc": "Raipur",
      "subdist": "xxxx",
      "street": "sector 1 street 1",
      "house": "xx",
      "landmark": "xxxx",
      "pincode": "492xxx",
      "careof": "S/O: Venimadhav xxxxxx"
    },
    "profilePic": "/9j/4AAQSkZJRgABAgAAAQABAAxxxxxxxxxxxxxx",
    "mobileVerified": 1,
    "emailHash": "",
    "mobileHash": "",
    "shareCode": "xxxx",
    "mobileMatched": "1"
  },
  "resText": "SUCCESS",
  "pointUsed": "",
  "resCode": "200"
}
            

              curl 'https://api.clubapi.in/utility/transaction.php' \
                --max-time 10 \

              -H 'accept: application/json' \
              -H 'content-type: application/json' \
              --data-raw '{"token":"xxxxxxxx","aadhaarNumber":"xxxxxxx","aadhaarMobile":"xxxxxxxx","otp":"175067","otpSessionId":"xxxxxx","transType":"aadhaarVerifyOtp"}' \
            
          

            <?php

            $url = "https://api.clubapi.in/utility/transaction.php";

            $curl = curl_init($url);
            curl_setopt($curl, CURLOPT_URL, $url);
            curl_setopt($curl, CURLOPT_POST, true);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); // wait max 10 seconds to connect
            curl_setopt($curl, CURLOPT_TIMEOUT, 10); // wait max 10 seconds for response

            $headers = array(
            "accept: application/json",
            "content-type: application/json",
            );
            curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

            $data = '{"token":"xxxxxxxx","aadhaarNumber":"xxxxxxx","aadhaarMobile":"xxxxxxxx","otp":"175067","otpSessionId":"xxxxxx","transType":"aadhaarVerifyOtp"}';

            curl_setopt($curl, CURLOPT_POSTFIELDS, $data);

            //for debug only!
            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

            $resp = curl_exec($curl);
            curl_close($curl);
            var_dump($resp);

            ?>
          

            URL url = new URL("https://api.clubapi.in/utility/transaction.php");
            HttpURLConnection http = (HttpURLConnection)url.openConnection();
            http.setRequestMethod("POST");
            http.setDoOutput(true);
            http.setConnectTimeout(10000); // 10 seconds
            http.setReadTimeout(10000);    // 10 seconds
            http.setRequestProperty("accept", "application/json");
            http.setRequestProperty("content-type", "application/json");

            String data = "{\"token\":\"xxxxxxxx\",\"aadhaarNumber\":\"xxxxxxx\",\"aadhaarMobile\":\"xxxxxxxx\",\"otp\":\"175067\",\"otpSessionId\":"xxxxxx",\"transType\":\"aadhaarVerifyOtp\"}";

            byte[] out = data.getBytes(StandardCharsets.UTF_8);

            OutputStream stream = http.getOutputStream();
            stream.write(out);

            System.out.println(http.getResponseCode() + " " + http.getResponseMessage());
            http.disconnect();
          

            var url = "https://api.clubapi.in/utility/transaction.php";

            var httpRequest = (HttpWebRequest)WebRequest.Create(url);
            httpRequest.Method = "POST";
            httpRequest.Timeout = 10000; // 10 seconds

            httpRequest.Headers["accept"] = "application/json";
            httpRequest.Headers["content-type"] = "application/json";

            var data = "{\"token\":\"xxxxxxxx\",\"aadhaarNumber\":\"xxxxxxx\",\"aadhaarMobile\":\"xxxxxxxx\",\"otp\":\"175067\",\"otpSessionId\":"xxxxxx",\"transType\":\"aadhaarVerifyOtp\"}";

            using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
            {
              streamWriter.Write(data);
            }

            var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
            using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
            {
              var result = streamReader.ReadToEnd();
            }

            Console.WriteLine(httpResponse.StatusCode);