---
description: Below you will see the fields designated for the country Mexico
---

# Mexico

### Document validations

<table data-header-hidden><thead><tr><th width="150">Document Type</th><th width="174">Description</th><th width="316">ID for individuals and/or legal entities</th><th width="154">Length</th><th width="150">Data Type</th><th width="163">Verification Digit</th><th width="217">Mandatory for methods</th><th width="211">Document ID Example</th><th data-hidden>Validation</th></tr></thead><tbody><tr><td>Document Type</td><td>Description</td><td>ID for individuals and/or legal entities</td><td>Length</td><td>Data Type</td><td>Verification Digit</td><td>Mandatory for methods</td><td>Document ID Example</td><td>Validation</td></tr><tr><td>RFC</td><td>Registro Federal de Contribuyentes = Federal Taxpayer Registry</td><td>Legal and Individual Entities</td><td>12-13</td><td>Alphanumeric</td><td>No</td><td>N/A</td><td>MAL180222MS6</td><td>Document</td></tr></tbody></table>

### Example: How to validate IDs through the api?

{% hint style="info" %}
**`Remember that you can validate documents through the LP api`. See** [**Document Validation service**](https://docs.v3.localpayment.com/before-payment/document-validation)**.**
{% endhint %}

Below you can find  some examples to validate through our api. You can also test with the examples above. Please, note the  structure of each **`ID type`** (lenght, dots, hyphen, lowercase/uppercase).



{% tabs %}
{% tab title="Example I: RFC" %}
```
{
    "document": {
        "id" :"BNM840515VB1",
        "type" :"RFC"
    },
    "country" : "MEX"
}
```
{% endtab %}

{% tab title="Example II: RFC" %}
```
{
    "document": {
        "id" :"PALH800229876",
        "type" :"RFC"
    },
    "country" : "MEX"
}
```
{% endtab %}

{% tab title="Valid ID Response" %}
```
{
    "code": "200",
    "description": "Valid id and type document"
}
```
{% endtab %}
{% endtabs %}

**Validate IDs through the LP api:**

{% embed url="https://docs.v3.localpayment.com/before-payment/validations/document-validation" %}

#### Check the Country `ISOCode 3:`

{% embed url="https://docs.v3.localpayment.com/api-reference-guide/country_codes" %}
