PAN's syntax
The PAN (or PAN number) is a ten-character long alpha-numeric unique identifier.
The first five characters are letters (in uppercase by default), followed by four numerals, and the last (tenth) character is a letter.
Failure Response:
{
"is_success": true,
"data": {
"error": "PAN does not exist in the NSDL database."
}
}
Failure Response for Demo PANs in Production:
{
"is_success": false,
"error": {
"message": "NSDL returned error status code: -1",
"code": "invoid_error",
"details": {
"error_data": {
"response": "NSDL has sent a failure response.",
"payload": {
"error": "NSDL returned error status code: -1"
}
}
}
}
}
If we enter a PAN which is not in the above format then it will throw an NSDL error.