curatedapi
Browse the docs

Guides

Finance

Excel functions

Late payments

E-invoices

Accounting

Number checks

VAT and GST

Billing and pricing

Money and currencies

Dates and time

Math

Unit conversion

Everyday

Health

PAN check (India) API

Check the structure of an Indian Permanent Account Number and read the kind of holder from its fourth character.

POST https://api.curatedapi.com/v1/calc/check/india-pan

Checks a ten-character Permanent Account Number: five letters, four digits and a letter, where the fourth character says whether the holder is an individual, a company, a firm, a trust and so on. The rule for the last letter is not published, so it cannot be checked.

Formula

5 letters (the fourth is the holder type) + 4 digits + 1 letter
  • The number is checked by arithmetic alone. Nothing is looked up, so a valid result means the number is well formed, not that the account, company or security exists.
  • The last letter of a PAN is a check letter, but the Income Tax Department does not publish how it is worked out. A PAN that passes here has the right structure only.

Inputs

Send numbers as strings to keep every digit. options sets precision and rounding (see numbers and rounding).

InputTypeDescription
number required string The 10-character PAN. Spaces, dots, hyphens and slashes are ignored, and lower-case letters are read as upper case. At most 64 characters.

Result

Under result in the answer, next to exactness, precision, inputs, formula, references and warnings.

ResultTypeDescription
validbooleanWhether the PAN passes every check.
normalizedstringThe number as it was checked: separators removed, letters in upper case.
problemstringWhat is wrong, when valid is false: CHARACTERS: a character that cannot appear in this kind of number; LENGTH: the wrong number of characters; COUNTRY: an unknown or unsupported country code; FORMAT: the right length but the wrong structure; CHECK_DIGIT: the check digit or check characters do not match the rest of the number.
messagestringThe result in a sentence, naming the rule that failed.
holder_codestringThe fourth character.
holderstringThe kind of holder it stands for.

Examples

A firm's PAN

Requestcurl
curl https://api.curatedapi.com/v1/calc/check/india-pan \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "AAPFU0939F"
  }'
200 OKResponse
{
  "calculator": "check/india-pan@1",
  "result": {
    "valid": true,
    "normalized": "AAPFU0939F",
    "message": "A well-formed PAN (firm or limited liability partnership).",
    "holder_code": "F",
    "holder": "Firm or limited liability partnership"
  },
  "exactness": {},
  "precision": null,
  "inputs": {
    "number": "AAPFU0939F"
  },
  "formula": "5 letters (the fourth is the holder type) + 4 digits + 1 letter",
  "references": [
    {
      "title": "Income Tax Department: Permanent Account Number",
      "url": "https://incometaxindia.gov.in/Pages/tax-services/apply-for-pan.aspx"
    }
  ],
  "warnings": []
}

Digits and letters in the wrong places

Requestcurl
curl https://api.curatedapi.com/v1/calc/check/india-pan \
  -H "Authorization: Bearer $CURATEDAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "AAPF10939F"
  }'
200 OKResponse
{
  "calculator": "check/india-pan@1",
  "result": {
    "valid": false,
    "normalized": "AAPF10939F",
    "problem": "FORMAT",
    "message": "A PAN is five letters, four digits and a final letter."
  },
  "exactness": {},
  "precision": null,
  "inputs": {
    "number": "AAPF10939F"
  },
  "formula": "5 letters (the fourth is the holder type) + 4 digits + 1 letter",
  "references": [
    {
      "title": "Income Tax Department: Permanent Account Number",
      "url": "https://incometaxindia.gov.in/Pages/tax-services/apply-for-pan.aspx"
    }
  ],
  "warnings": []
}

References

Results follow each calculator's documented rules and the sources listed. They are not financial, tax or legal advice. Check that the rules fit your case before you rely on a result. See the terms.

Errors share one format; see errors. Billing, retries and batches work the same for every endpoint.