ID Number Regex
Validate the ID number format to prevent failed ID lookups due to invalid format
The most common reason for failure of an ID lookup is because the end user did not input their ID number correctly. One of the best ways to mitigate this is to validate ID numbers on the client-side, before sending them to Smile ID. Below we will provide validation regexes for most of our ID types. It is important to note that they change over time, and we will do our best to keep this page updated.
Know Your Customer (KYC)
Country | Country Code | id_type | Regex |
---|---|---|---|
Ghana | GH | PASSPORT |
|
Ghana | GH | SSNIT |
|
Ghana | GH | VOTER_ID |
|
Ghana | GH | NEW_VOTER___ID |
|
Kenya | KE | ALIEN_CARD |
|
Kenya | KE | KRA_PIN |
|
Kenya | KE | NATIONAL_ID |
|
Kenya | KE | NATIONAL_ID_NO_PHOTO |
|
Kenya | KE | PASSPORT |
|
Nigeria | NG | BVN |
|
Nigeria | NG | NIN_V2 * |
|
Nigeria | NG | NIN_SLIP |
|
Nigeria | NG | PHONE_NUMBER |
|
Nigeria | NG | VOTER_ID |
|
South Africa | ZA | NATIONAL_ID |
|
South Africa | ZA | NATIONAL_ID_NO_PHOTO |
|
South Africa | ZA | PHONE_NUMBER |
|
Uganda | UG | NATIONAL_ID_NO_PHOTO |
|
Zambia | ZM | BANK_ACCOUNT | |
ZM | TPIN |
|
*: Tokenized version of the NIN
Last updated