> ## Documentation Index
> Fetch the complete documentation index at: https://developer.tazapay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Address Validation

Ensure correct input from customers to increase conversion

It is mandatory to ensure the following validations for the billing address for customers in United States of America (US) and Canada (CA). This is applicable to:

1. `/v3/checkout`
2. `/v3/escrow`
3. `/v3/payin`
4. `confirmPayment()` (Javascript SDK)

## Validations

| Field                                 | Validation                                                                                                                                                                                                                    | Applicable for countries |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| `billing_details.address.country`     | ISO 3166-1 alpha-2 country code (in uppercase)                                                                                                                                                                                | US, CA                   |
| `billing_details.address.line1`       | Min 4 characters, only alphanumeric characters allowed                                                                                                                                                                        | US, CA                   |
| `billing_details.address.city`        | Only alphanumeric characters allowed                                                                                                                                                                                          | US, CA                   |
| `billing_details.address.state`       | Only alphanumeric characters allowed                                                                                                                                                                                          | US, CA                   |
| `billing_details.address.state`       | 2-letter State/Province code (ISO 3166-2). The state names and code can be accessed from [this list for US](https://www.iso.org/obp/ui/#iso:code:3166:US) and [this list for CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA) | US, CA                   |
| `billing_details.address.postal_code` | For US, valid length is 5 or 9 and the format is NNNNN. For CA, valid length is 6 and the format is ANA NAN (A = Alphabet, N = Number)                                                                                        | US, CA                   |
| `billing_details.phone.calling_code`  | Only codes from [this list](https://en.wikipedia.org/wiki/List_of_country_calling_codes)                                                                                                                                      | US, CA                   |
| `billing_details.phone.number`        | Only numeric values allowed. Length allowed: USA: 10, Canada: 10                                                                                                                                                              | US, CA                   |
