Skip to content

PAN Card OCR API

New

Read an uploaded PAN card image and get the printed name, PAN, date of birth and parent name back as structured fields. Your onboarding, lending or vendor workflow can use them directly.

Overview

PAN Card OCR reads an image of a PAN card and returns the details printed on it as structured fields. The card can arrive photographed, scanned, or supplied as a page of a PDF. The PAN is the identifier most Indian financial workflows are built around. It appears on loan files, merchant applications, investment accounts, vendor masters and payout records. The response may carry the name as printed, the PAN itself, the date of birth, and the parent or guardian name on the card. Available fields vary by data source and by record, since card design, worn print and glare all change what can be read. OCR reports what is printed. It does not establish that the card is genuine or that the details match the issuing source. Capture with OCR, then confirm with a verification service where the decision needs that assurance.

Coverage
PAN cards issued in India, across the older and current card designs the reader supports
Input
A PAN card image or PDF page, captured or uploaded by the applicant
Output
Structured name, PAN, date of birth and parent-name fields, where legible on the card
Typical users
Lending, fintech, insurance, marketplace, staffing and finance operations teams
Coverage note
Reads the printed card; confirming the PAN against a source is a separate verification step

The overview and the sections after the reference are the FinSour API catalog’s own record for this service, rendered unaltered.

Endpoint URL and method

POSThttps://gateway.staging.finsour.io/v1/documents/pan-card

Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.

Authentication

Scheme API key travels in the X-Api-Key header

Send your API key in this header on every call, from your own server: a key sent from a browser is refused. A key starting fs_test_ calls the sandbox and one starting fs_live_ calls production, at the same address. Create keys in the FinSour console.

Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.

Request parameters

Content type multipart/form-data

Headers

NameTypeRequiredDescriptionConstraints
Idempotency-KeystringRequiredA key you generate for each attempt. Sending the same key again returns the first answer instead of running the check twice; the same key with a different body is refused.8 to 255 characters. Matches ^[A-Za-z0-9._:-]+$
FinSour-VersionstringRequiredSend 2026-11-01 on this call and on every poll to get the receipt and the result described on this page. A call without it is served under 2026-09-01, whose job has a different shape.—

Body

NameTypeRequiredDescriptionConstraints
filefileRequiredThe document to read.—
payloadstring (JSON)RequiredA JSON string carrying the call's options.—
payload.optionsobjectRequiredSettings for this call. This API requires consent.—
payload.options.referencestringOptionalYour own reference for this call. It comes back unchanged as meta.reference.1 to 128 characters
payload.options.consentobjectRequiredThe person's consent to this check.—
payload.options.consent.obtainedbooleanRequiredSend true once the person has agreed to the check.Always true
payload.options.consent.atstring (date-time)RequiredWhen the person gave consent.—
payload.options.consent.purposestringRequiredWhat the check is for, for example kyc.1 to 64 characters

Request samples

cURL

curl -X POST https://gateway.staging.finsour.io/v1/documents/pan-card \
  -H "X-Api-Key: $FINSOUR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "FinSour-Version: 2026-11-01" \
  -F "file=@<path-to-document>" \
  -F 'payload={"options":{"consent":{"obtained":true,"at":"2026-09-01T10:00:00Z","purpose":"kyc"}}}'

Node.js

import { openAsBlob } from "node:fs";

const form = new FormData();
form.append("file", await openAsBlob("<path-to-document>"));
form.append("payload", JSON.stringify({
  "options": {
    "consent": {
      "obtained": true,
      "at": "2026-09-01T10:00:00Z",
      "purpose": "kyc"
    }
  }
}));

const response = await fetch("https://gateway.staging.finsour.io/v1/documents/pan-card", {
  method: "POST",
  headers: {
    "X-Api-Key": process.env.FINSOUR_API_KEY,
    "Idempotency-Key": crypto.randomUUID(),
    "FinSour-Version": "2026-11-01",
  },
  body: form,
});

console.log(response.status, await response.json());

Python

import os
import uuid
import json

import requests

response = requests.post(
    "https://gateway.staging.finsour.io/v1/documents/pan-card",
    headers={
        "X-Api-Key": os.environ["FINSOUR_API_KEY"],
        "Idempotency-Key": str(uuid.uuid4()),
        "FinSour-Version": "2026-11-01",
    },
    files={"file": open("<path-to-document>", "rb")},
    data={"payload": json.dumps({
        "options": {
            "consent": {
                "obtained": True,
                "at": "2026-09-01T10:00:00Z",
                "purpose": "kyc",
            },
        },
    })},
    timeout=30,
)

print(response.status_code, response.json())

Generated from the fields above. Replace each value in angle brackets with your own; the key is read from FINSOUR_API_KEY.

Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.

Response schema

Status 202 · content type application/json

NameTypePresentDescriptionConstraints
dataobjectAlwaysThe job that will read the document.—
data.jobIdstringAlwaysThe job's id. Poll GET /v1/jobs/{jobId} with it.Matches ^[0-9A-HJKMNP-TV-Z]{26}$
data.statusstringAlwaysAlways queued: the job is accepted and has not started.Always "queued"

The result

Poll GET /v1/jobs/{jobId}. Once the job has finished, data holds these fields:

NameTypePresentDescriptionConstraints
jobIdstringAlways——
statusstringAlways—One of queued, processing, completed, needs_review, unreadable, failed, expired, cancelled
documentTypestring or nullAlwaysThe kind of document found, once it has been read; null before that.—
confidencenumber or nullAlwaysThe document's confidence, 0 to 1, to two places; null until it has been read.Minimum 0. Maximum 1
fieldsobjectAlwaysWhat was read. Every key is always present: null means the document does not carry it, or it could not be read with enough confidence.—
fields.maskedNumberstring or nullAlways——
fields.namestring or nullAlways——
fields.fatherNamestring or nullAlways——
fields.dobstring or nullAlwaysISO date, YYYY-MM-DD; a year or month alone is YYYY or YYYY-MM.—
fieldsToReviewarray of stringsAlwaysWhen status is needs_review, the fields a person should confirm; empty otherwise.—
failureReasonstringSometimesPresent only when status is unreadable or failed.One of UNREADABLE_IMAGE, LOW_CONFIDENCE, DOCUMENT_TYPE_MISMATCH, UNSUPPORTED_MEDIA_TYPE, FILE_TOO_LARGE, INPUT_CORRUPT, PAGE_LIMIT_EXCEEDED, TIMEOUT, PROCESSING_ERROR

Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.

Error codes

CodeStatusMeaningRetrying
API_VERSION_UNSUPPORTED400That API version is no longer supported.Do not retry automatically
IDEMPOTENCY_KEY_INVALID400That Idempotency-Key does not meet the required format.Do not retry automatically
IDEMPOTENCY_KEY_REQUIRED400An Idempotency-Key header is required for this request.Do not retry automatically
REQUEST_MALFORMED400The request could not be parsed.Do not retry automatically
AUTH_KEY_EXPIRED401The API key is not valid.Do not retry automatically
AUTH_KEY_INVALID401The API key is not valid.Do not retry automatically
AUTH_KEY_MISSING401No API key was presented.Do not retry automatically
AUTH_KEY_REVOKED401The API key is not valid.Do not retry automatically
INSUFFICIENT_BALANCE402The available balance is not enough for this request.Do not retry automatically
AUTH_IP_NOT_ALLOWED403This API key may not be used from this address.Do not retry automatically
ENTITLEMENT_MISSING403This organization is not entitled to that product in this environment.Do not retry automatically
ORGANIZATION_SUSPENDED403This organization is not active.Do not retry automatically
PRODUCT_NOT_AVAILABLE403That product is not available.Do not retry automatically
PRODUCT_RETIRED403That product has been withdrawn.Do not retry automatically
SCOPE_INSUFFICIENT403This API key does not carry the scope this product requires.Do not retry automatically
PRODUCT_NOT_FOUND404No such product.Do not retry automatically
IDEMPOTENCY_KEY_REUSED409That idempotency key was already used for a different request.Do not retry automatically
PRICE_UNAVAILABLE409No active price covers this product right now.Safe to retry
REQUEST_IN_PROGRESS409An earlier attempt with this key is still running.Safe to retry
SETTLEMENT_PENDING409This request is awaiting reconciliation by an operator.Do not retry automatically
API_VERSION_SUNSET410That API version passed its announced sunset date.Do not retry automatically
REQUEST_TOO_LARGE413The request body is too large.Do not retry automatically
OCR_UNSUPPORTED_MEDIA_TYPE415That document format is not accepted.Do not retry automatically
UNSUPPORTED_MEDIA_TYPE415That content type is not accepted on this route.Do not retry automatically
CONSENT_REQUIRED422This product requires an explicit consent flag.Do not retry automatically
SANDBOX_FIXTURE_MISSING422No sandbox fixture exists for this input. Use a different test value.Do not retry automatically
UPSTREAM_REJECTED422The upstream source rejected the input.Do not retry automatically
VALIDATION_FAILED422The request payload is invalid.Do not retry automatically
CONCURRENCY_LIMIT429Too many simultaneous requests.Safe to retry
OCR_QUEUE_SATURATED429The document queue is full. Retry shortly.Safe to retry
QUOTA_EXCEEDED429The allowance for this window is spent.Do not retry automatically
RATE_LIMITED429Too many requests.Safe to retry
INTERNAL_ERROR500An unexpected error occurred.Safe to retry
OUTCOME_UNCERTAIN502The outcome of this request is not yet known. Retry with the same Idempotency-Key.Do not retry automatically
UPSTREAM_UNAVAILABLE502The upstream source is unavailable. Retry shortly.Safe to retry
MAINTENANCE_MODE503The service is in a maintenance window.Safe to retry
NO_PROVIDER_AVAILABLE503No provider can serve this product right now.Safe to retry
OCR_UNAVAILABLE503Document reading is unavailable right now. Retry later.Safe to retry
SERVICE_OVERLOADED503The service is shedding load. Retry shortly.Safe to retry
UPSTREAM_TIMEOUT504The upstream source did not respond in time.Safe to retry

Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.

Rate limits

ScopeLimitWindowAt the limit
Your API key, within your organisation's limitThe figure in X-RateLimit-LimitPer minute429 RATE_LIMITED, with Retry-After in seconds. Every answer past authentication carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Supplied by FinSour platform API contract (finsour development at 80e8b83bf) on . OpenAPI document at commit 436311c32, API version 2026-11-01. The beta is served from the staging gateway.

Use cases

  • Lending and NBFCs: open a credit file from the card the applicant photographed
  • Fintech and PSPs: capture merchant details during digital merchant signup
  • Insurance: record proposer details at proposal and at high-value claim stage
  • Marketplaces: collect seller details before a payout account is activated
  • Staffing and gig platforms: capture contractor details for payout records
  • Real estate: capture buyer details for high-value transaction records

What this service does

  • The fields a finance workflow needs

    Name as printed, the PAN, date of birth and the parent or guardian name come back as labeled values. They are ready to map onto your application form or vendor master. The fields on offer vary by data source and by record, and worn or partly cropped cards may return fewer of them.

  • A shape you can check the PAN against

    A PAN has a fixed shape. A structural check on the value it returns catches many misreads early. A well-formed value is still only a reading, which is why a confirmation screen belongs in the flow.

  • Keeps keying errors out of payout records

    A mistyped PAN does not fail at capture. It fails months later at reconciliation, when a payout is held or a filing is rejected. Reading the card and confirming it at the point of capture keeps that error out of the record entirely.

  • Reads the card without vouching for it

    OCR reports what is printed on the supplied image and cannot tell a genuine card from a convincing forgery. Place it ahead of a verification step, never in place of one, and keep the two results distinct in your records.

How a check runs

  1. Photograph the PAN card

    The applicant photographs or uploads the PAN card inside your app, web journey, agent tool or partner portal. Record the consent you have taken for that purpose.

  2. Upload the card to the API

    Your own application sends the captured file. Which formats and file sizes are accepted depends on the selected service contract.

  3. Get the name, PAN and date of birth back

    The details the reader could resolve come back as labeled values. Anything it could not read comes back marked as unread, never guessed.

  4. Check the PAN on screen

    Show the read PAN and name back to the applicant or a reviewer. Character confusion in an identifier is the failure worth catching while the person is still present.

  5. Write the confirmed values to your records

    Pass the confirmed values into onboarding, underwriting, vendor or payout records, and keep captured data distinct from anything a verification service later confirms.

Questions

What is a PAN Card OCR API?
An interface that accepts an image of a PAN card and returns the details printed on it as structured fields. Your application fills a form from the document.
Does PAN Card OCR verify that the PAN is valid?
No, OCR reads what is printed on the supplied image. It does not establish that the card is genuine or current, and it does not check the details against the issuing source. A separate verification service covers that, and you should store the two results as separate facts.
Which details does a PAN card reading return?
Depending on what is legible, the response may include the name as printed, the PAN and the date of birth. It may also include the parent or guardian name shown on the card. Treat each value as available information a reviewer can correct, since what comes back changes with the data source and the individual record.
How do I catch a misread character in the PAN?
Several letters and digits look alike in the fonts used on these cards. A structural check on the shape of the returned value catches many misreads early. Beyond that, showing the value back for confirmation while the applicant is still in the journey is the practical safeguard.
Can it read older PAN card designs?
The reader supports the card designs described in the selected service contract. Older layouts, faded print, glare and partly cropped frames all affect what can be read. Expect some cards to need a retake or a short manual correction step.
Do I need consent to read a PAN card?
Yes, a PAN card is personal data and carries a tax identifier. Collect it only for a purpose you have stated to the applicant, with their consent, and use it for nothing else. Restrict who can open the raw image, and retain the file only as long as your policy and the rules applying to your business allow.

Catalog entry last updated .