# Brazil

Brazilian eKYC verification matches submitted individual data against Brazilian government sources of truth. Brazil also supports a separate income verification endpoint that returns employment and income data for a valid CPF. See the [eKYC API Reference](https://developer.incode.com/docs/ekyc-api-reference) for common response semantics that apply across all identity-matching sources.

## Available sources

| Source    | API source string | Description                                                                                             |
| --------- | ----------------- | ------------------------------------------------------------------------------------------------------- |
| BR GOVT 1 | `BR_GOVT_1`       | Verifies submitted data against Brazilian government records associated with the provided tax ID (CPF). |

{/* TODO: Confirm with PM — the API source string. Existing API documentation does not explicitly list the source string; `BR_GOVT_1` is inferred from the Dashboard source name. */}

## BR GOVT 1

### Request parameters

| Parameter     | Required  | Description                                                                                  |
| ------------- | --------- | -------------------------------------------------------------------------------------------- |
| `source`      | Mandatory | Must be `BR_GOVT_1`.                                                                         |
| `country`     | Mandatory | Must be `BR`.                                                                                |
| `taxId`       | Mandatory | Brazilian CPF. Eleven digits.                                                                |
| `firstName`   | Mandatory | First name of the individual.                                                                |
| `surName`     | Mandatory | Last name of the individual. If the individual has a middle name, include it here.           |
| `houseNo`     | Optional  | House number.                                                                                |
| `street`      | Optional  | Full street including apartment number.                                                      |
| `city`        | Optional  | City of the individual's address (for example, `Rio de Janeiro`).                            |
| `state`       | Optional  | Two-letter state code (for example, `RJ`).                                                   |
| `postalCode`  | Optional  | Postal code.                                                                                 |
| `dateOfBirth` | Optional  | Format: `yyyy-mm-dd`.                                                                        |
| `nationality` | Optional  | Accepted values: `BRAZILIAN`, `NATURALIZED_BRAZILIAN`, `FOREIGNER`, `BRAZILIAN_BORN_ABROAD`. |

### Response fields

BR GOVT 1 anchors verification on the tax ID (CPF). See the [eKYC API Reference](https://developer.incode.com/docs/ekyc-api-reference) for common match field definitions and status values. BR GOVT 1 uses `approximatematch` as an alternative to `fuzzy` for some fields, and `unabletoverify` for address components when the individual has no driver's license record.

| Field                   | Statuses                                                 | Description                                                                                                                                                                             |
| ----------------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `taxIdMatch`            | `exact`, `nomatch`                                       | Matches submitted CPF against the CPF in the government source of truth.                                                                                                                |
| `taxIdNameMatch`        | `exact`, `approximatematch`, `nomatch`                   | Matches submitted name against the name associated with the CPF in the government source of truth.                                                                                      |
| `taxIdDobMatch`         | `exact`, `nomatch`                                       | Matches submitted date of birth against the date of birth associated with the CPF.                                                                                                      |
| `taxIdStateMatch`       | `exact`, `nomatch`, `unabletoverify`                     | Matches submitted state against the government source of truth.                                                                                                                         |
| `taxIdAddressMatch`     | `exact`, `approximatematch`, `nomatch`, `unabletoverify` | Matches submitted address against the government source of truth. Approximate match is returned when at least two address elements (street, postal code, city, or state) match exactly. |
| `taxIdCityMatch`        | `exact`, `nomatch`, `unabletoverify`                     | Matches submitted city against the government source of truth.                                                                                                                          |
| `taxIdPostalCodeMatch`  | `exact`, `nomatch`, `unabletoverify`                     | Matches submitted postal code against the government source of truth.                                                                                                                   |
| `taxIdNationalityMatch` | `exact`, `nomatch`                                       | Matches submitted nationality against the CPF in the government source of truth.                                                                                                        |
| `taxIdLevel`            | `low`, `high`                                            | Risk level associated with the CPF. See below.                                                                                                                                          |
| `overallLevel`          | `low`, `medium`, `high`                                  | Overall risk level of the submitted attributes associated with the CPF.                                                                                                                 |

**Note:** `unabletoverify` is returned for address-based fields (`taxIdStateMatch`, `taxIdAddressMatch`, `taxIdCityMatch`, `taxIdPostalCodeMatch`) when the individual does not have a driver's license record. Addresses are validated through the Brazilian government's driver's license source of truth.

### taxIdLevel

`taxIdLevel` reflects the status of the submitted CPF:

- `low`: The CPF status is regular (verified).
- `high`: The CPF status is suspended, associated with a deceased holder, pending regularization, canceled due to multiplicity, or canceled by authority.

### Reason codes

BR GOVT 1 returns reason codes alongside match and risk-level fields. Selected Brazil-specific reason codes:

| Reason code | Description                                                                                                                            |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| `ASDL`      | Unable to verify address because the CPF does not have a CNH (driver's license) in the official government database.                   |
| `TSR`       | Tax ID status (situação CPF) is regular.                                                                                               |
| `TSRF`      | Tax ID status is not regular. It may be suspended, canceled due to pending regularization, null, or associated with a deceased holder. |
| `TSRP`      | Tax ID status is pending regularization.                                                                                               |
| `TNPIN`     | Tax ID check was not performed due to invalid nationality.                                                                             |
| `TLGPD`     | Tax ID check was not performed due to LGPD (minor's data).                                                                             |
| `ASCV`      | State and country validated.                                                                                                           |

For the full list of reason codes, see [eKYC Reason Codes](https://developer.incode.com/docs/ekyc-reason-codes).

### Sample response

```json
{
    "kyc": [
        { "key": "taxIdNationalityMatch", "status": "exact" },
        { "key": "taxIdDobMatch", "status": "exact" },
        { "key": "taxIdMatch", "status": "exact" },
        { "key": "taxIdAddressMatch", "status": "approximatematch", "reasonCodes": ["ASCV"] },
        { "key": "taxIdNameMatch", "status": "exact" },
        { "key": "taxIdStateMatch", "status": "exact" },
        { "key": "taxIdCityMatch", "status": "exact" },
        { "key": "taxIdPostalCodeMatch", "status": "nomatch" },
        { "key": "taxIdLevel", "status": "low", "reasonCodes": ["TSR"] },
        { "key": "overallLevel", "status": "low" }
    ]
}
```

## Income verification

Brazil supports a separate endpoint for retrieving employment and estimated income data for a valid CPF. This endpoint is distinct from the standard eKYC endpoint and returns employment type, employment sector, and an estimated income range in Brazilian Real.

### Endpoint

**POST /omni/externalVerification/income**

For the request contract, see the [eKYC Income Verification](https://developer.incode.com/reference/externalverificationincome) API reference.

### Response fields

| Field               | Statuses             | Description                                                                                                     |
| ------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------- |
| `employment_type`   | `success`, `failure` | Employment type for the individual (for example, `ENTREPRENEUR / BUSINESS OWNER`, `SELF-EMPLOYED`, `EMPLOYEE`). |
| `employment_sector` | `success`, `failure` | Employment sector, including the CNAE code and description.                                                     |
| `income_range`      | `success`, `failure` | Estimated monthly income range in Brazilian Real (R$), based on a statistical prediction model.                 |

Each field returns a `status` (indicating whether data was available), a `sub_label` (a display label for the field), and a `message` (the actual value or `Unavailable`).

### Estimated income range

The income range is calculated as a multiple of the Brazilian minimum wage and returned as a range in Brazilian Real (R$).

| Income range (R$) |
| ----------------- |
| No information    |
| 0 - 1412          |
| 1412 - 2824       |
| 2824 - 4236       |
| 4236 - 7060       |
| 7060 - 9884       |
| 9884 - 14120      |
| 14120 - 21180     |
| 21180 - 28240     |
| Above 28240       |

{/* TODO: Confirm with PM — the income range table reflects the 2024 Brazilian minimum wage (R$1412). Confirm the current minimum wage figure and update the table accordingly. */}

### Employment type

Employment type describes the individual's current employment status. Example values:

- `ENTREPRENEUR / BUSINESS OWNER`
- `SELF-EMPLOYED`
- `EMPLOYEE`

### Employment sector

Employment sector describes the industry the individual works in, including a CNAE code and Portuguese-language description. The CNAE (Classificação Nacional de Atividades Econômicas) is Brazil's national classification of economic activities, maintained by the Instituto Brasileiro de Geografia e Estatística (IBGE).

Example values:

- `PRIVATE - 4789001 - COMERCIO VAREJISTA DE SUVENIRES, BIJUTERIAS E ARTESANATOS`
- `PRIVATE - 7319002 - PROMOCAO DE VENDAS`
- `PUBLIC - 8412400 - REGULACAO DAS ATIVIDADES DE SAUDE, EDUCACAO, SERVICOS CULTURAIS E OUTROS SERVICOS SOCIAIS`

For the full CNAE classification, see the [IBGE CNAE reference](https://concla.ibge.gov.br/busca-online-cnae.html).

### Sample response

```json
{
    "income": [
        {
            "key": "employment_type",
            "status": "success",
            "sub_label": "Type",
            "message": "ENTREPRENEUR | BUSINESS OWNER"
        },
        {
            "key": "employment_sector",
            "status": "success",
            "sub_label": "Sector",
            "message": "PRIVATE - 4639701 - COMERCIO ATACADISTA DE PRODUTOS ALIMENTICIOS EM GERAL"
        },
        {
            "key": "income_range",
            "status": "success",
            "sub_label": "Estimated Income Range",
            "message": "9240-13200"
        }
    ]
}
```

### Availability

Income data may not always be available even for a valid, verified CPF. If a CPF passes the standard BR GOVT 1 check but no income data is available, the income verification endpoint returns `failure` statuses for the affected fields.
