Skip to main content
POST
/
voter-id
Verify Voter ID
curl --request POST \
  --url https://sandbox.cashfree.com/verification/voter-id \
  --header 'Content-Type: application/json' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '
{
  "verification_id": "test123",
  "epic_number": "UAI4574761",
  "name": "John Doe"
}
'
import requests

url = "https://sandbox.cashfree.com/verification/voter-id"

payload = {
"verification_id": "test123",
"epic_number": "UAI4574761",
"name": "John Doe"
}
headers = {
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({verification_id: 'test123', epic_number: 'UAI4574761', name: 'John Doe'})
};

fetch('https://sandbox.cashfree.com/verification/voter-id', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.cashfree.com/verification/voter-id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'verification_id' => 'test123',
'epic_number' => 'UAI4574761',
'name' => 'John Doe'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-id: <api-key>",
"x-client-secret: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://sandbox.cashfree.com/verification/voter-id"

payload := strings.NewReader("{\n \"verification_id\": \"test123\",\n \"epic_number\": \"UAI4574761\",\n \"name\": \"John Doe\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://sandbox.cashfree.com/verification/voter-id")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"verification_id\": \"test123\",\n \"epic_number\": \"UAI4574761\",\n \"name\": \"John Doe\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.cashfree.com/verification/voter-id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"verification_id\": \"test123\",\n \"epic_number\": \"UAI4574761\",\n \"name\": \"John Doe\"\n}"

response = http.request(request)
puts response.read_body
{
  "reference_id": 1358,
  "verification_id": "testverificationid",
  "status": "VALID",
  "epic_number": "UAI4574761",
  "name": "HARSHIT PRAJAPATI",
  "name_in_regional_lang": "ą¤¹ą¤°ą„ą¤·ą¤æą¤¤",
  "age": "23",
  "relation_type": "FTHR",
  "relation_name": "RAJ PRAJAPATI",
  "relation_name_in_regional_lang": "राज",
  "father_name": "RAJ PRAJAPATI",
  "dob": "2000-12-07",
  "gender": "Male",
  "address": "GOVT JUNIOR COLLEGE SIRWAR",
  "photo": "PHOTO_LINK.jpeg",
  "split_address": {
    "district": [
      "INDORE"
    ],
    "state": [
      [
        "Madhya Pradesh"
      ]
    ],
    "city": [
      "SANER"
    ],
    "pincode": "560034",
    "country": [
      "IN",
      "IND",
      "INDIA"
    ],
    "address_line": "GOVT JUNIOR COLLEGE SIRWAR"
  },
  "state": "Madhya Pradesh",
  "assembly_constituency_number": "211",
  "assembly_constituency": "SANER",
  "parliamentary_constituency_number": "25",
  "parliamentary_constituency": "INDORE",
  "part_number": "27",
  "part_name": "SIRWAR",
  "serial_number": "713",
  "polling_station": "GOVT JUNIOR COLLEGE SIRWAR"
}

Authorizations

x-client-id
string
header
required

Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.

x-client-secret
string
header
required

The secret key associated with your client ID. Use this to authenticate your API requests. You can find this in your Merchant Dashboard.

Headers

x-cf-signature
string

Send the signature if two-factor authentication is selected as Public Key. More details.

Body

application/json

Find the request parameters to fetch voter ID details.

verification_id
string
required

It is the unique ID you create to identify the verification request. The maximum character limit is 50. Alphanumeric, period (.), hyphen (-), and underscore ( _ ) are allowed.

Example:

"test123"

epic_number
string
default:UAI4574761
required

It is the unique identification number assigned to each voter ID.

Example:

"UAI4574761"

name
string
default:John Doe

It is the name of the voter ID card holder.

Maximum string length: 50
Example:

"John Doe"

Response

Success response for retreiving voter ID information.

reference_id
integer

It displays the unique ID created by Cashfree Payments for reference purposes. format: int64

Example:

1358

verification_id
string

It displays the unique ID you created to identify the verification request.

Example:

"testverificationid"

status
string

It displays the status of the API request. Possible values are

  • VALID: The provided Epic Number is valid.
  • INVALID: The provided Epic Number is invalid.
Example:

"VALID"

name
string

It displays the name of the individual as present in the voter ID card.

Example:

"SUSHMITHA H"

name_in_regional_lang
string

It displays the name of the individual in the individual regional language as present in the voter ID card.

Example:

"ą¤¹ą¤°ą„ą¤·ą¤æą¤¤"

age
string

It displays the age of the voter ID holder as present in the voter ID card.

Example:

"25"

relation_type
string

It displays the type of the relationship with the parent/guardian as present in the voter ID card.

Example:

"FTHR"

relation_name
string

It displays the name of the parent/guardian as present in the voter ID card.

Example:

"SUNILAKUMAR"

relation_name_in_regional_lang
string

It displays the name of the parent/guardian in the individual regional language as present in the voter ID card.

Example:

"राज"

father_name
string

It displays the father name of the individual as present in the voter ID card.

Example:

"SUNILAKUMAR"

dob
string | null

It displays the date of birth of the individual as present in the voter ID card. Note: This field can return null.

Example:

""

gender
string

It displays the gender of the individual as present in the voter ID card.

Example:

"Female"

address
string

It displays the address information of the individual as present in the voter ID card.

Example:

"GOVT JUNIOR COLLEGE SIRWAR"

photo
string

It is a pre-signed url of voter id holder's photo with expiry of 24 hrs.

split_address
object

It contains the address information of the individual as present in the voter ID card.

Example:
{
"value": {
"district": ["RAICHUR"],
"state": ["Karnataka"],
"city": ["Manvi"],
"pincode": "560034",
"country": ["IN", "IND", "INDIA"],
"address_line": "GOVT JUNIOR COLLEGE SIRWAR"
}
}
epic_number
string

It displays the EPIC number of the individual as present in the voter ID card.

Example:

"XXX0000000"

state
string

It displays the name of the state as present in the voter ID card.

Example:

"Karnataka"

assembly_constituency_number
string

It displays the number associated with the assembly constituency as present in the voter ID card.

Example:

"55"

assembly_constituency
string

It displays the name of the assembly constituency as present in the voter ID card.

Example:

"MANVI"

parliamentary_constituency_number
string

It displays the number associated with the parliamentary constituency as present in the voter ID card.

Example:

"6"

parliamentary_constituency
string

It displays the name of the parliamentary constituency as present in the voter ID card.

Example:

"Raichur"

part_number
string

It displays the part number in the electoral roll.

Example:

"29"

part_name
string

It displays the part name in the electoral roll.

Example:

"GOVERMENT JUNIOR COLLEGE 2nd Room (South Wing ) sirwar"

serial_number
string

It displays the serial number as present in the voter ID card.

Example:

"892"

polling_station
string

It displays the place where the individual cast votes during elections.

Example:

"GOVT JUNIOR COLLEGE SIRWAR"