A voter ID verification API takes the number printed on an Elector's Photo Identity Card, known as the EPIC number, and returns what the electoral record holds for it: the name (also in the regional language of the roll), the relative named on it, date of birth, gender, age, address, constituencies, roll part and polling station. With StampMitra you send POST /v1/verify/voter-id with a voterId and, optionally, the name you expect, using a key that carries the verification.voter.read scope. The response comes back with a valid flag, a status, those record fields, and a referenceId and verificationId for your records.
This page is for the developer adding an ID-document step to onboarding and for the compliance or operations owner who has to decide what that step proves. It is deliberately practical about the awkward parts: an address that was correct at the last electoral roll revision, a date of birth you might use for an age gate, names that were transliterated from a regional language, and a card that tells you nothing about whether the person holding it is the person on it. If you only need the field list, the Voter ID API reference has it. Here you will find what to do with the fields.
Contract details here are drawn from StampMitra's Voter ID API reference; where that reference says nothing, the page says nothing too. It is general information, not legal advice.
Key takeaways
- Endpoint:
POST https://api-b2b.stampmitra.in/v1/verify/voter-id. Body:voterId, plus an optionalname. Scope:verification.voter.read. - The response guarantees
referenceId,verificationIdandvalid. Everything else is optional and appears when the electoral roll provides it:status,epicNumber,name,nameInRegionalLang,age, the relative fields,fatherName,dob,gender,address,splitAddress,photoUrl,state, the constituency, part and polling station fields. The photo is only a link, and there is no name-match score, so you do the name comparison yourself. - Price is the standard verification rate, ₹5 per completed call on pay-as-you-go, excluding GST. Sandbox is free and never debits the wallet.
- A valid result shows that the number exists in the record. It does not show that the applicant is the person on the card.
- Address and age come from the record as it stood at its last update. Use them to corroborate, not as the final word on where someone lives today.
- Date of birth, gender and address are personal data. Keep them out of logs and store only what the decision needs.
- Malformed input returns
400and is not billed. A negative result is a completed, billed check. - Voter ID works best as one document in a ladder with PAN, driving licence and bank account checks, ordered by cost and by what you need to prove.
What an EPIC is and what the lookup returns
The Election Commission of India issues the Elector's Photo Identity Card to registered voters, and the number on it identifies the voter's entry in the electoral roll. Under the hood the lookup resolves that number to the roll entry. StampMitra's reference does not name the upstream source or describe update frequency, so treat the response as a snapshot of the entry at the moment of the call.
The sample response for a valid number:
Request parameters
| Field | Type | Description |
|---|---|---|
Authorizationrequired | header | Bearer <api-key> (e.g. sk_test_... in sandbox, sk_live_... in production). The x-api-key header is also accepted. |
voterIdrequired | string | EPIC / Voter ID number, format ABC1234567. |
name | string | Name to match against records. |
Response fields
| Field | Type | Description |
|---|---|---|
referenceId | string | StampMitra's own transaction id for this call (SMV-YYYYMMDD-XXXXXXX). Always present, including on a negative result. |
verificationId | string | StampMitra's own id for this verification (VRF- followed by 12 base32 characters). Generated for every call, unique to it. Always present. Quote it in support requests. |
valid | boolean | Whether the voter ID is valid. Always present. |
status | string | Outcome of the lookup: VALID or INVALID. |
epicNumber | string | The voter ID (EPIC) number that was looked up. |
name | string | The voter's registered name, when the voter ID is valid. |
nameInRegionalLang | string | The voter's name in the regional language of the roll. |
age | string | The voter's age in years, as a string, when available. |
relationType | string | Type of the relation named on the roll (for example FTHR for father, HUSB for husband). |
relationName | string | Name of the relative named on the roll. |
relationNameInRegionalLang | string | The relative's name in the regional language of the roll. |
fatherName | string | The voter's father's name, when the roll gives it. |
dob | string | The voter's date of birth, ISO yyyy-mm-dd, when the roll has one. |
gender | string | The voter's gender, when the voter ID is valid. |
address | string | The registered address as one line, when the voter ID is valid. |
photoUrl | string | A link to the voter photo, when the roll has one. A link only, never image data; it can expire, so fetch it promptly. |
splitAddress | object | The registered address split into parts. |
splitAddress.district | array | District(s). |
splitAddress.state | array | State name(s), as a flat list. |
splitAddress.city | array | City or town name(s). |
splitAddress.pincode | string | PIN code. |
splitAddress.country | array | Country, as the codes and name given by the registry. |
splitAddress.addressLine | string | The address as one line. |
state | string | The registered state, when the voter ID is valid. |
assemblyConstituencyNumber | string | Assembly constituency number. |
assemblyConstituency | string | Assembly constituency name. |
parliamentaryConstituencyNumber | string | Parliamentary constituency number. |
parliamentaryConstituency | string | Parliamentary constituency name. |
partNumber | string | Part number of the electoral roll. |
partName | string | Part name of the electoral roll. |
serialNumber | string | Serial number of the voter within the part. |
pollingStation | string | Name of the polling station. |
Reading the fields in the order that matters for decisions:
valid is the headline. If it is false, there is nothing further to interpret: the number did not resolve to a record, and the right action is to ask the user to re-enter or to offer another document.
name is the elector's name as held in the record. This is the field you compare with your applicant's name. In the documented sample it is upper case.
dob is the date of birth as an ISO calendar date, and age is a string such as "23". Treat dob as the primary value and compute age yourself at the time of your decision; the returned age is a convenience that reflects the moment the record was read.
gender is a word such as Male in the sample. Do not assume values beyond those you have seen.
address is the address as one free-text line, and state is the state of the electoral roll entry. If you intend to compare the address with a structured address from your form, use splitAddress, which gives the same address in parts: district, state, city and country are lists of strings, and pincode and addressLine are strings.
nameInRegionalLang is the name in the regional language of the roll, and relationType, relationName and relationNameInRegionalLang name the relative recorded against the voter (FTHR in the sample stands for father). fatherName repeats the father's name when the roll gives it. Keep the regional-language text as a string and do not try to transliterate it yourself for matching.
assemblyConstituency, parliamentaryConstituency (each with its number), partNumber, partName, serialNumber and pollingStation place the voter in the roll. They are useful for support and audit, and rarely needed for a yes or no decision.
photoUrl is a link to the photo held against the entry, when there is one. It is a link only, never image data, and it can expire, so fetch it promptly if you need it and do not store the link as a permanent reference.
status is VALID or INVALID and agrees with valid; branch on valid.
referenceId is StampMitra's transaction identifier in the format SMV-YYYYMMDD-XXXXXXX. It is present on every completed call, including a negative one, and it is not an idempotency key. verificationId (format VRF- plus 12 characters) is StampMitra's own id for this verification, generated for every call; quote it in support requests.
What the record cannot tell you
A voter ID check is a record lookup. Be explicit about its limits in your policy and your product copy.
It does not prove who is presenting the card. The response can carry a link to the roll photo, but that does not tie the number to the person in front of you: someone can type a real EPIC number that belongs to another person. If your risk model needs to tie the document to the applicant, pair it with a selfie and liveness step or another check that carries a biometric, which this endpoint does not provide.
It does not prove current residence. An address is whatever the electoral roll holds. People move, and updates to the roll lag behind.
It is not a citizenship determination. An EPIC establishes enrolment as an elector. How your regulator treats it as an identity or address document depends on your sector, so check the current rules that apply to you rather than assuming.
It carries no name-match score. The name field you may send is documented as the name to match against records, but the documented response shows no match result. Do not build logic that looks for a field that is not in the contract. Compare the returned name with your applicant's name yourself.
Handling the date of birth
Age gates are a common reason to verify an ID. The temptation is to read the returned age and compare. A more reliable pattern is to derive age from dob at the moment you need it, in Indian Standard Time.
export function ageOn(dobIso, today = new Date()) {
const [y, m, d] = dobIso.split("-").map(Number);
// Compare calendar dates, not timestamps, so the birthday itself counts.
const t = new Date(today.getTime() + 5.5 * 3600_000); // shift to IST
let age = t.getUTCFullYear() - y;
const before = t.getUTCMonth() + 1 < m || (t.getUTCMonth() + 1 === m && t.getUTCDate() < d);
if (before) age -= 1;
return age;
}
export function meetsMinimumAge(voter, minimum = 18) {
return ageOn(voter.dob) >= minimum;
}Two cautions. First, a returned dob may be a placeholder or approximate in an older record, for example a date of 1 January of the birth year. If your decision hangs on a narrow margin, such as someone turning eighteen this month, send the case to review and ask for a second document. Second, if the applicant typed a date of birth into your form, compare it with the record's dob and treat a mismatch as a reason to look, not an automatic rejection, because transposed digits happen.
Matching the name
Names in the electoral record can differ from names on other documents for ordinary reasons: the roll was prepared in a regional language and transliterated, a surname comes first, a middle name is missing, honorifics were dropped. Plan for a gray zone.
A workable approach is to normalise both strings to upper case, remove punctuation and honorifics, split into tokens and compare token sets, allowing initials to match full names.
const STOP = new Set(["SHRI", "SMT", "MR", "MRS", "MS", "DR", "KUMARI"]);
export function nameTokens(raw) {
return String(raw)
.toUpperCase()
.replace(/[^A-Z\s]/g, " ")
.split(/\s+/)
.filter((t) => t && !STOP.has(t));
}
export function nameOverlap(a, b) {
const A = nameTokens(a), B = nameTokens(b);
if (A.length === 0 || B.length === 0) return 0;
const hit = (x, y) => x === y || (x.length === 1 && y.startsWith(x)) || (y.length === 1 && x.startsWith(y));
const matched = A.filter((x) => B.some((y) => hit(x, y))).length;
return matched / Math.max(A.length, B.length);
}Map the overlap into three bands: a high overlap passes, a middle band goes to a person, a low overlap fails. Choose the cut-offs from a sample of your own real applicants, not from sandbox, whose names are synthetic. Write the thresholds down with a date.
Using the address sensibly
The address arrives as one free-text string, with splitAddress giving the same address in parts. People sometimes expect to use it as proof of current address, which it is not. Use it for three modest things instead.
Corroboration. Compare the state, and where present the pincode, with what the applicant declared. A different state is worth a question, not a rejection.
Pre-fill with confirmation. Offering the address back to the user to confirm or correct saves typing, provided you show it and let them edit it. Do not silently store it as their current address.
Fraud signals. The same address string appearing across many unrelated applicants in a short window is a pattern to look at, though you must store the address to see it, so weigh that against the minimisation advice below.
export function extractPincode(address) {
const m = String(address).match(/\b[1-9]\d{5}\b/);
return m ? m[0] : null;
}A pincode is six digits and does not begin with zero, which is enough for the pattern above. The record's address may not contain one, so the function returns null rather than guessing.
Input handling and the EPIC format
The documented sample is ABC1234567: three letters followed by seven digits, ten characters in all, and the validation message reads "voterId must match the format ABC1234567". Users type these from a card photo, so expect lower case, spaces and the confusion between the letter O and zero.
export function normaliseVoterId(raw) {
return String(raw).toUpperCase().replace(/[\s\-.]/g, "");
}Do not write a stricter pattern of your own. Older cards and some state series do not follow the three-letter, seven-digit shape, and an over-strict client rule will reject real voters. Normalise lightly and let the API validate. A malformed value returns 400 BAD_REQUEST before verification and is not billed; the message names the field so you can show it to the user.
Billing and failure behaviour
- Metered as
voter.verify, recorded after a successful response. In production the wallet is debited when the verification completes. - The price is the standard verification rate, ₹5 per completed call on pay-as-you-go and lower on higher plans. See the pricing page. Rates exclude 18% GST.
- A negative result, for example a number that does not resolve, is a completed verification. It is recorded, billed and returns a
referenceId. 400,401and403do not complete a verification and are not billed.402 PAYMENT_REQUIREDmeans insufficient wallet balance; top up rather than retry.429 TOO_MANY_REQUESTSis the rate limit. The documented example reads "Rate limit exceeded: 60 requests per 60 seconds for this endpoint." In sandbox it can also be a sandbox limit (10 a minute or 200 a day per organisation; codeSANDBOX_RATE_LIMIT,SANDBOX_DAILY_LIMITorSANDBOX_IP_LIMIT).502 INTERNAL_ERRORmeans the upstream service could not be reached. No completed check, no completed-call charge. Retry with backoff.referenceIdis not an idempotency key and the route documents no idempotency header, so a timed-out call may already have been billed.
| Status | Code | Meaning | Your action |
|---|---|---|---|
| 400 | BAD_REQUEST | voterId does not match the format | Show the message, ask for correction |
| 401 | UNAUTHORIZED | Missing or invalid key | Fix deployment |
| 402 | PAYMENT_REQUIRED | Wallet balance insufficient | Top up, alert operations |
| 403 | FORBIDDEN | Key lacks verification.voter.read | Issue a key with the scope |
| 429 | TOO_MANY_REQUESTS | Rate limit or sandbox limit (SANDBOX_RATE_LIMIT, SANDBOX_DAILY_LIMIT or SANDBOX_IP_LIMIT) | Back off with jitter |
| 502 | INTERNAL_ERROR | Upstream unreachable | Retry with backoff |
Every error uses one envelope, { "error": { "code", "message", "requestId" } }, so one parser handles them all and the requestId is what support asks for.
400Validation errorBAD_REQUESTvoterId must match the format ABC1234567
401Missing or invalid API keyUNAUTHORIZEDMissing or invalid API key.
402Insufficient wallet balancePAYMENT_REQUIREDInsufficient fulfilment wallet balance to cover this call.
403Valid key, missing required scopeFORBIDDENAPI key is valid but lacks the required scope for this endpoint.
429Rate limitedTOO_MANY_REQUESTSRate limit exceeded: 60 requests per 60 seconds for this endpoint.
502Upstream verification service unreachableINTERNAL_ERRORUnable to reach the order/customer service right now
Why a check fails, and what to say to the user
Failure messages to end users should be specific without being accusatory.
- The number does not resolve. Most often a typo, a card photo misread, or a number from a different series. Ask the user to re-check the card and offer another document if they cannot.
- The number resolves but the name differs. Often transliteration. Show the user the name you hold and let them confirm which is theirs rather than telling them the check failed.
- The date of birth differs. Ask whether they entered it correctly. If the record's date is a placeholder, a second document settles it.
- The service is unavailable. A
502is not the user's problem. Tell them it is temporarily unavailable and let them continue or resume later.
Keep the technical code for your logs and the plain reason for the screen.
Where voter ID verification fits in a workflow
Field-force and agent onboarding. A company recruiting agents across towns often finds that people have a voter ID but may not have every other document. The flow collects the EPIC number, verifies it, compares the name, shows the address for confirmation, and moves on to a bank account check for payouts. The voter ID is the identity anchor.
Microfinance and group lending. Applicants frequently carry a voter ID as their primary document. A lender verifies it, computes age from dob against its eligibility range, and records the referenceId on the file. The address is used to corroborate the branch catchment, not as legal proof of residence.
Age-restricted services. Where a service must confirm an adult user, the date of birth from a verified document is a stronger input than a self-declared one. The check does not tell you the person on the other end is the document holder, so combine it with other controls where the stakes justify it.
Customer data refresh. A business updating stale customer records can verify a number the customer supplies and offer the returned address for confirmation. Never overwrite the customer's own address without their confirmation.
The document ladder: voter ID with PAN, driving licence and bank checks
No single document answers every question. Think of a ladder, and stop climbing when you have what the decision needs.
| You need to establish | Reach for | Why |
|---|---|---|
| A person exists and has a government-issued identity | Voter ID, Driving Licence or Passport | Different people hold different documents |
| A tax identity and registered name | PAN verification | Names and the PAN status that finance teams rely on |
| A real account to pay | Bank account verification | Confirms the account and the holder name |
| A business entity | GSTIN verification | Legal and trade names, status |
Run the document the applicant volunteers first, then the one your finance or regulatory rules require. If the voter ID name and the PAN name agree, and the bank account name agrees with both, you have three independent records that are mutually consistent, which is considerably stronger than any one of them. Stop at the first hard failure. Because the checks have different rates, running the cheapest decisive one first saves money without losing signal.
Integration walkthrough
cURL
curl -X POST "https://api-b2b.stampmitra.in/v1/verify/voter-id" \
-H "Authorization: Bearer $STAMPMITRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"voterId":"ABC1234567","name":"Rahul Kumar"}'Node.js
The Node.js SDK and Python SDK wrap this endpoint if you prefer a client library. The raw calls show exactly what they do.
// Node 18+ (built-in fetch)
const BASE = "https://api-b2b.stampmitra.in";
export async function verifyVoterId({ voterId, name }, { timeoutMs = 20000 } = {}) {
const res = await fetch(`${BASE}/v1/verify/voter-id`, {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.STAMPMITRA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ voterId: normaliseVoterId(voterId), ...(name ? { name } : {}) }),
signal: AbortSignal.timeout(timeoutMs),
});
const body = await res.json().catch(() => ({}));
if (res.ok) return { kind: "completed", result: body };
const { code, message, requestId } = body.error ?? {};
const retryable = res.status === 429 || res.status === 502;
return { kind: retryable ? "retry" : "failed", status: res.status, code, message, requestId };
}Python
import os, re, requests
BASE = "https://api-b2b.stampmitra.in"
def verify_voter_id(voter_id: str, name: str | None = None, timeout: int = 20) -> dict:
payload = {"voterId": re.sub(r"[\s\-.]", "", voter_id.upper())}
if name:
payload["name"] = name
resp = requests.post(
f"{BASE}/v1/verify/voter-id",
headers={"Authorization": f"Bearer {os.environ['STAMPMITRA_API_KEY']}"},
json=payload,
timeout=timeout,
)
body = resp.json() if resp.content else {}
if resp.ok:
return {"kind": "completed", "result": body}
err = body.get("error", {})
return {
"kind": "retry" if resp.status_code in (429, 502) else "failed",
"status": resp.status_code,
"code": err.get("code"),
"message": err.get("message"),
"requestId": err.get("requestId"),
}Turning the result into an outcome
export function assessVoter(result, applicant, { minOverlap = 0.85, minAge = 18 } = {}) {
if (result.valid !== true) return { outcome: "reject", reason: "not_found", referenceId: result.referenceId };
const overlap = nameOverlap(applicant.name, result.name);
const reasons = [];
if (overlap < minOverlap) reasons.push("name_unclear");
if (applicant.dob && applicant.dob !== result.dob) reasons.push("dob_differs");
if (!meetsMinimumAge(result, minAge)) reasons.push("under_minimum_age");
return {
outcome: reasons.length === 0 ? "approve" : "review",
reasons,
referenceId: result.referenceId,
};
}The function rejects only on a record that does not resolve. Everything else that is not a clean match goes to a reviewer, because the cost of a wrongly rejected genuine applicant is usually higher than the cost of a short manual look.
Edge cases and odd inputs
- Placeholder dates of birth. Some records hold a date such as 1 January of the birth year. Send narrow-margin age decisions to review.
- Regional-language names. The same person may be written differently across documents. Allow transliteration variance and keep a reviewer in the loop.
- Card photos misread.
0versusO,1versusI,5versusS. Show the number back to the user in a clear typeface and let them confirm before the call. - Duplicate cards. A person can hold a replacement card with a different number after a transfer or correction. A negative on an old number does not mean the person is not enrolled; ask for the current card.
- Newly enrolled voters. A number issued recently may not appear yet. Retry later and offer an alternative document meanwhile.
- Empty or short addresses. Treat the address as optional and tolerate an empty string.
- E-EPIC downloads. A digital copy of the card carries the same number. Normalise it like any other.
- Case and spacing in
name. Normalise before comparing. - Applicants under eighteen. An EPIC exists only for enrolled electors, so a younger applicant is a signal to look more closely at the document and the age.
Audit logging and monitoring
What should a record of a voter ID check contain? Enough to reconstruct the decision, and no more. Your applicant ID, the referenceId, the outcome with reason codes, the name-overlap score and the thresholds that applied, the HTTP status, the requestId for errors and a timestamp. Not the EPIC number, the name, the date of birth, the gender, the address, or the raw response. When debugging needs a link between a log line and an EPIC, store a keyed hash.
StampMitra's own request logs are available at GET /v1/logs and in the dashboard, kept for as long as your plan allows, up to 365 days on Scale. Your decision records are yours to retain according to what your audits require.
Three trends deserve attention. A climbing review rate often follows a form or OCR change. A climbing rate of 400 responses points at the client, usually normalisation. And a cluster of 502 calls is a cue to degrade gracefully, for instance by letting the applicant continue with a different document while the service recovers. Keep 429 and 402 counts on the same board.
Modelling the cost
A voter ID check is a standard-rate call. The costs that matter are retries and fallbacks.
export function monthlyVoterCost({ applicants, voterShare = 0.4, retryShare = 0.2, pricePerCall }) {
const voterApplicants = applicants * voterShare;
const calls = voterApplicants * (1 + retryShare);
return { calls: Math.ceil(calls), cost: Math.ceil(calls) * pricePerCall };
}Suppose a lender onboards 5,000 applicants a month, 40 percent choose voter ID as their document, and 20 percent of those need a second attempt because of a misread number. That is 2,000 first attempts and 400 retries, 2,400 calls. Multiply by your plan's standard rate and add 18% GST on the top-up. A UI that shows the typed number back to the user for confirmation before submitting cuts the retry share. Dropping it from 20 percent to 5 percent saves 300 calls a month, which pays for the extra screen very quickly.
If you offer applicants a choice among documents, remember that a fallback is a second call at its own rate. Model the expected number of calls per applicant, not per document.
Sandbox and production
The sandbox key, sk_test_, arrives with sign-up and never touches your wallet. It serves sample data: Voter ID has no published magic inputs, so a given EPIC always gets the same reply, roughly two in three of them valid, with made-up names throughout. That is plenty for authentication, scope handling, normalisation, error paths and the approve, review and reject screens, and a few saved responses keep unit tests off the network. It will not help you choose name thresholds or estimate genuine failure rates, and sandbox limits are not production limits.
For production you need an sk_live_ key, created after your organisation's KYC and a Voter ID production application are approved. The server picks the environment from the key. Apply from the dashboard with a specific description of your use, fund the wallet, swap the secret, and watch the first live traffic closely.
Restrict the key
Because the response includes date of birth and address, grant the key only verification.voter.read (see the authentication docs), give each service its own, hold it in a secrets manager, bind it to your servers' addresses wherever your plan includes an IP allowlist, and call only from the backend. A 403 on a valid key means the scope is missing.
Privacy and consent, in general terms
Dates of birth, gender and addresses are personal data, and an identity number attached to them raises the stakes. India's Digital Personal Data Protection Act, 2023 and its rules govern how such data is processed; your counsel should tell you what applies. What follows is customary practice and not legal advice.
- Explain, in plain words and before the user types the number, why you verify the ID.
- Ask only for what the decision needs. An age check does not need an address.
- Keep the outcome, reason codes,
referenceIdand timestamp. Keepdob,genderoraddressonly when a rule or a real need demands it, and say so in your notice. - Do not let identity data gathered for onboarding drift into marketing.
- Limit reviewer access to the people who need it.
- Set a retention period and enforce it.
- Give people a way to ask what you hold and to correct it.
- Agree processor terms with StampMitra as your counsel advises.
A worked scenario: onboarding collection agents in small towns
Consider a fictional lender, Paramount Microcredit, that hires collection agents in towns where many candidates hold a voter ID but not necessarily a passport or a driving licence. The agent signs up in a mobile app. Here is what the backend does, and why each step is there.
- The app asks for the EPIC number and shows it back. After the agent types it, the screen repeats the number in large type and asks "Is this exactly what is printed on your card?". The confirmation step exists because a misread character costs a billed call and an annoyed candidate.
- The backend normalises and calls once. It uppercases, strips spaces and posts to
/v1/verify/voter-idwith the typed name. If the call returns429, the app tells the agent to wait a few seconds; if502, it saves the draft and offers to resume. - The record resolves. The backend compares the returned
namewith the name from the application using token overlap, and compares the returneddobwith the typed date of birth. - A clean match moves on. If the overlap is high and the date of birth agrees, the agent proceeds to the bank account step with the verified name as the expected account holder name.
- A middle result opens a task. If the overlap falls in the gray zone, a reviewer sees both names and the date of birth, with the address text hidden unless the reviewer opens it. Most of these turn out to be initials or a transliteration difference, and the reviewer approves with a reason code.
- A dob difference gets a second document. If the record's date of birth differs and the record's date is a first of January, the app asks for a second document rather than rejecting.
- The agent confirms the address. The app shows the address from the record and asks the agent to confirm it or type their current one. Only the confirmed value is stored as the agent's address.
- Records kept. Paramount stores the
referenceId, the outcome, the reason codes, the reviewer ID and timestamps. It does not store thevoterId, the record's address or the date of birth from the response, because the loan product does not need them after onboarding.
What makes this workable is that no step relies on something the endpoint does not provide: the photo comes only as a link, so the lender relies on its own selfie step for liveness, and there is no match score, so the lender computes overlap itself. The check supplies a reliable record; the lender's process supplies the judgement.
Production checklist
- The key has only
verification.voter.read, sits in a secrets manager and is IP-restricted where possible. - The
voterIdis normalised, not strictly validated, on your side. - Age is computed from
dobin IST at decision time. - Names are compared with token matching and thresholds taken from real data.
- The address is shown for confirmation, never silently stored as current.
- Retries happen only on
429and502, with backoff. - Logs hold reference IDs and outcomes, not personal fields.
- Wallet balance and
402alerts exist. - A review queue exists with a written policy.
- The notice states why the ID is verified and what is kept.
- You have tested a misread number, a transliterated name, a placeholder date of birth, a
429and a502.
Common mistakes
- Assuming the response contains a name-match score. It does not. Compare names yourself.
- Treating a valid number as proof of the person. There is no photo in the response.
- Using
agefrom the response as a stored fact. Derive it fromdobwhen you need it. - Storing the address as the customer's current address. Confirm it with them.
- Writing a strict EPIC regex. Older series differ, and genuine voters get rejected.
- Logging the response. It puts dates of birth and addresses in log storage.
- Rejecting on a name difference. Transliteration is the usual cause.
- Calling from the client. It exposes the key and sidesteps your allowlist.
What to read next
Voter ID sits alongside PAN verification, Driving Licence verification, Passport verification and bank account verification. Sandbox vs production API keys covers key handling and API errors and handling covers retries. For a full onboarding flow, see the KYC API for fintech and NBFC use case, and for the complete field reference, the Voter ID API docs.
Sources
- Voter ID API reference, StampMitra product data: request fields, response example, scope and validation message, checked October 2026.
- Pricing, StampMitra: per-call rates, plan limits and log retention, checked October 2026. Rates exclude 18% GST.
- Election Commission of India, for how the Elector's Photo Identity Card and the electoral roll work. Check the current guidance on the official site.
- Digital Personal Data Protection Act, 2023, Government of India. Read the current Act and the rules made under it on the official government sites.
Sandbox test values
Send one of these values as voterId with a sandbox key (sk_test_...) to get that outcome. They are fake, valid in format, and never reach a real source or your wallet. Send with it: name: Rahul Kumar. Add the header X-Sandbox-Delay-Ms (up to 3000) to hold the reply and test your client timeout.
| Scenario | Input to send | What you get back |
|---|---|---|
| Valid Voter ID | SBX0000001 | 200 |
| Voter ID not found | SBX0000002 | 200 |
| Verification source times out | SBX0000005 | 502INTERNAL_ERROR |
| Verification source unavailable | SBX0000006 | 502INTERNAL_ERROR |
| Rate limited | SBX0000007 | 429TOO_MANY_REQUESTS |
| Wallet balance too low | SBX0000008 | 402PAYMENT_REQUIRED |
| Invalid format | SBX000000 | 400BAD_REQUEST |
Frequently asked questions
What does the voter ID verification API return?
It returns the full voter record: valid and status, the EPIC number, name (also in the regional language), the relative named on the roll, dob, gender, age, address and splitAddress, a photoUrl link, state, constituencies, roll part, serial number and polling station, plus a referenceId and a verificationId. Only referenceId, verificationId and valid are always present. There is no name-match score, so you compare the returned name with your applicant's name yourself.
What is an EPIC number and what format does the API expect?
EPIC is the number on the Elector's Photo Identity Card. The documented sample is ABC1234567, three letters and seven digits. Normalise to upper case without spaces and let the API validate, because older series differ and a strict client pattern would reject genuine voters.
Does a valid result prove the applicant is the person on the card?
No. The record lookup shows that the number exists and what the roll holds for it. Someone can type another person's real number. If you need to tie the document to the applicant, add a selfie and liveness step or another check that carries a biometric.
Can I use the returned address as proof of current residence?
Treat it as corroboration only. The address is whatever the electoral roll held at its last update, and people move. Show it to the user to confirm or correct, and store only the value they confirm as their current address.
How should I use the date of birth for an age check?
Compute age from dob in Indian Standard Time at decision time rather than trusting the returned age as a stored fact. Some older records hold placeholder dates such as a first of January, so send narrow-margin cases to review and ask for a second document.
Is there a name match score in the response?
No. You may send a name, documented as the name to match against records, but the documented response shows no match result. Compare names yourself using token matching that tolerates initials and transliteration, and set thresholds from real applicant data.
When am I billed for a voter ID check?
Usage is recorded and the production wallet debited only after the verification completes. A negative result is still a completed, billed check. A malformed voterId, bad key or missing scope returns 400, 401 or 403 and is not billed, and sandbox calls never debit your wallet.
Which errors should my integration handle?
Handle 400 for a malformed voterId, 401, 402 for low wallet balance, 403 for a missing scope, 429 for the rate limit and 502 when the upstream service is unreachable. Retry only 429 and 502 with backoff, and log the requestId from the shared error envelope.
Can I test voter ID verification for free?
Yes. A sandbox key starting with sk_test_ never debits your wallet and returns sample data with synthetic names, so the same input always gives the same answer. It proves plumbing and error handling, not your name-matching thresholds or real failure rates.
What personal data should I store after the check?
Store the outcome, reason codes, referenceId and timestamp. Avoid storing dob, gender, address or the voterId unless a rule or genuine need requires it, keep them out of logs, set a retention period and explain in your notice what you keep and why.
How does voter ID fit with PAN, driving licence and bank checks?
Think of a ladder. Verify the document the applicant volunteers, then the PAN for tax identity, then a bank account for payouts. If the voter ID, PAN and bank account names agree you have three consistent records. Stop at the first hard failure and run cheaper decisive checks first.
Why does my valid key return 403 on this endpoint?
The key is valid but lacks the verification.voter.read scope. Issue a key with that scope, keep it narrow and call from your backend only. Where your plan includes an IP allowlist, restrict the key to your servers, because this endpoint returns date of birth and address.