# Countries Specifications

## Countries and currencies

* The country codes are in **ISO 3166-1 alpha-2** format.&#x20;
* The currencies are in **ISO 4217** format.

| Country       | Country code&#xA;(ISO 3166-1 alpha-2 code) | Currency code &#xA;(ISO 4217) |
| ------------- | :----------------------------------------: | :---------------------------: |
| Australia     |                     AU                     |            USD/AUS            |
| Bangladesh    |                     BD                     |            USD/BDT            |
| Côte d'Ivoire |                     CI                     |           USD / XOF           |
| Egypt         |                     EG                     |            USD/EGP            |
| Ghana         |                     GH                     |           USD / GHS           |
| India         |                     IN                     |           USD / INR           |
| Indonesia     |                     ID                     |           USD / IDR           |
| Japan         |                     JP                     |           USD / JPY           |
| Kenya         |                     KE                     |           USD / KES           |
| Malaysia      |                     MY                     |           USD / MYR           |
| Nigeria       |                     NG                     |           USD / NGN           |
| Philippines   |                     PH                     |           USD / PHP           |
| Singapore     |                     SG                     |           USD / SGD           |
| South Africa  |                     ZA                     |           USD / ZAR           |
| South korea   |                     KR                     |            USD/KRW            |
| Thailand      |                     TH                     |           USD / THB           |
| Turkey        |                     TR                     |            USD/TRY            |
| Uganda        |                     UG                     |           USD / UGX           |
| Vietnam       |                     VN                     |           USD / VND           |

## Documents validations

The `document` sent must follow the validations for its respective `document_type`  described below.

<table><thead><tr><th width="240">Country</th><th width="212.33333333333331">Document type</th><th>Validation</th></tr></thead><tbody><tr><td>Bangladesh</td><td>ID</td><td>Numeric. Length: 10 digits</td></tr><tr><td>Bangladesh</td><td>PASS</td><td>Length 9 digits,<br>Starting with 2 alphanumerical character (i.e: AB1234567)</td></tr><tr><td>Bangladesh</td><td>DL (Driving license)</td><td>Length: 15,<br>Starting with 2 alphanumerical characters, followed by 7 numerical digits, 1 alphanumerical character and finally 5 numerical (i.e: AB1234567C12345)</td></tr><tr><td>Cameroon</td><td>PASS</td><td>Numeric. Length between 9 and 11 inclusive</td></tr><tr><td>Cameroon</td><td>CI</td><td>Numeric. Length between 8 and 12 inclusive</td></tr><tr><td>Cameroon</td><td>DL (Driving License)</td><td>Numeric. Length between 8 and 10 inclusive</td></tr><tr><td>Côte d'Ivoire</td><td>ID</td><td>Length between 8 and 12 inclusive</td></tr><tr><td>Egypt</td><td>ID</td><td>Numeric. Length between 12 and 14</td></tr><tr><td>Ghana</td><td>ID</td><td>Length between 8 and 12 inclusive</td></tr><tr><td>India</td><td>ID (PAN)</td><td>Length 10. </td></tr><tr><td>India</td><td>DL (Driver's License)</td><td>Length between 15 and 16 inclusive</td></tr><tr><td>India</td><td>UID (Aadhar Card)</td><td>Numeric. Length 12</td></tr><tr><td>Indonesia</td><td>NIK / KTP</td><td>Numeric. Length between 14 and 18 inclusive</td></tr><tr><td>Japan</td><td>DL / ID / PASS / RD (Resident Registration Card)</td><td>Length between 9 and 12 inclusive</td></tr><tr><td>Kenya</td><td>ID</td><td>Length between 7 and 12 inclusive</td></tr><tr><td>Malaysia</td><td>ID</td><td>Numeric. Length between 10 and 14 inclusive</td></tr><tr><td>Nigeria</td><td>ID</td><td>Length between 9 and 12 inclusive</td></tr><tr><td>Nigeria</td><td>ID (NIN)</td><td>Numeric. Length 11</td></tr><tr><td>Nigeria</td><td>PASS (Passport)</td><td>Alphanumeric length between 8 and 10</td></tr><tr><td>Philippines</td><td>PSN</td><td>Numeric. Length between 9 and 13 inclusive</td></tr><tr><td>Singapore</td><td>NRIC</td><td>Length 9</td></tr><tr><td>Singapore</td><td>PASS</td><td>Length 9</td></tr><tr><td>South Africa</td><td>ID</td><td>Numeric. Length between 9 and 14 inclusive</td></tr><tr><td>South Korea</td><td>PASS</td><td>Length 9</td></tr><tr><td>South Korea</td><td>RRN <br>(Resident registration number)</td><td>Numeric. Length 13</td></tr><tr><td>Tanzania</td><td>ID</td><td>Length between 8 and 20 inclusive</td></tr><tr><td>Thailand</td><td>ID</td><td>Numeric. Length between 10 and 14 inclusive</td></tr><tr><td>Turkey</td><td>DL</td><td>Numeric Length between 5-8 digits</td></tr><tr><td>Turkey</td><td>TCKK <br>(Turkish National Identity Card (Kimlik Kartı)</td><td>Numeric length Between 5 to 20 digits</td></tr><tr><td>Uganda</td><td>RIC / NID</td><td>Numeric. Length between 11 and 15 inclusive</td></tr><tr><td>Vietnam</td><td>ID</td><td>Numeric. Length between 9 and 13 inclusive</td></tr></tbody></table>

## Postal code validations

The validation for the postal codes dependes up on the country sent. Make sure you validate them with the regex in the table below to avoid errors due to Invalid postal Code.

| Country       | Regex                  | Example |
| ------------- | ---------------------- | :-----: |
| Cameroon      | N/A                    |   N/A   |
| Côte d'Ivoire | N/A                    |   N/A   |
| Ghana         | `^[A-Za-z]{2}\d{3,5}$` |  AB1234 |
| India         | `^\d{3}[\s-/]?\d{3}$`  | 123-456 |
| Japan         | N/A                    |   N/A   |
| Indonesia     | `^\d{5}$`              |  12345  |
| Kenya         | `^\d{5}$`              |  12345  |
| Malaysia      | `^\d{5}$`              |  12345  |
| Nigeria       | `^\d{6}$`              |  123456 |
| Philippines   | `^\d{3,4}$`            |   1234  |
| Singapore     | N/A                    |   N/A   |
| South Africa  | `^\d{4}$`              |   2345  |
| Tanzania      | `^\d{5}$`              |  12345  |
| Thailand      | `^\d{5}$`              |  12345  |
| Uganda        | N/A                    |   N/A   |
| Vietnam       | `^\d{5}$`              |  12345  |

## Phone numbers validations

We use the Google's common library for parsing, formatting, and validating international phone numbers. Validating the phone numbers on your end could help preventing `Invalid phone number` errors.

{% embed url="<https://github.com/google/libphonenumber>" %}

## Emails validations

We suggest you using the following regex to validate email addresses on your end and prevent `invalid email` errors.

```
(?i)[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])
```
