# Brazil

## Required fields

| Field              | Format                                                                                                                               | Description                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
| `login`            | String                                                                                                                               | Cashouts login                                                                             |
| `pass`             | String                                                                                                                               | Cashouts pass                                                                              |
| `external_id`      | String (max length: 100)                                                                                                             | Transaction's ID on your end                                                               |
| `document_id`      | See [document validations](/knowledge-base/countries-specifications.md#documents-validations)                                        | Beneficiary's CPF.                                                                         |
| `country`          | `BR`                                                                                                                                 | See [country codes](/knowledge-base/countries-specifications.md#countries-and-currencies)  |
| `currency`         | `BRL` / `USD`                                                                                                                        | See [currency codes](/knowledge-base/countries-specifications.md#countries-and-currencies) |
| `amount`           | Number with up to 2 decimals                                                                                                         | Cashout amount                                                                             |
| `bank_code`        | See [bank codes](/api-documentation/cashouts-api/countries-validations/american-countries/brazil.md#bank-codes)                      | Code specifying the beneficiary's bank                                                     |
| `bank_account`     | See [validations below](/api-documentation/cashouts-api/countries-validations/american-countries/brazil.md#bank-account-validations) | Beneficiary's bank account                                                                 |
| `bank_branch`      | See [validations below](#bank-branch-validations)                                                                                    | Beneficiary's bank branch                                                                  |
| `account_type`     | See [account type codes](/api-documentation/cashouts-api/countries-validations/american-countries/brazil.md#account-types)           | Beneficiary's bank account type                                                            |
| `beneficiary_name` | String (max length: 100)                                                                                                             | Beneficiary's name                                                                         |

## Bank Account Validations

| Bank name        | Bank code | Format                                                                                                                                               | Example                                                |
| ---------------- | :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
| Banco do Brasil  |    001    | Format: DDDDDDDDD-X or DDDDDDDDDX where D are digits and X is a digit or the letter 'X'. The number of digits may change, but can't exceed 10 digits | 1234567890, 123456789-0, 123456789-X, 123456789X       |
| Santander        |    033    | Format: DDDDDDDDD, DDDDDDDDDD, DDDDDDDDD-D, DDDDDDDDD-D where D are digits. The number of digits may change, but will range from 9 to 10 digits.     | 12345678, 12345678-9                                   |
| Banrisul         |    041    | Format: DDDDDDDDD-D or DDDDDDDDDD where D are digits. The number of digits has to be 10                                                              | 1234567890, 123456789-0                                |
| Caixa            |    104    | Format: DDDDDDDDD-D or DDDDDDDDDDDDDD-D where D are digits. The number of digits has to be between 1 and 20                                          | <p>1234567890,</p><p>123456789-0, 12345678901234-5</p> |
| Bradesco         |    237    | Format: DDDDDDD-D or DDDDDDDD where D are digits. The number of digits may change, but can't exceed 8 digits                                         | 12345678, 1234567-8                                    |
| Mercado Pago     |    323    | Format: DDDDDDDDDD-D or DDDDDDDDDDD where D are digits. The number of digits may change, but can't exceed 11 digits                                  | 12345678910, 1234567891-0                              |
| Itaú             |    341    | Format: DDDDDD-D or DDDDDDD where D are digits. The number of digits may change, but will range from 6 to 7                                          | 123456, 12345-6                                        |
| Pix Key Document |   10002   | Empty string                                                                                                                                         | ""                                                     |
| Pix Key Phone    |   10000   | Empty string                                                                                                                                         |                                                        |
| Pix Key Email    |   10001   | Empty string                                                                                                                                         |                                                        |
| Pix Key Random   |   10003   | Empty string                                                                                                                                         |                                                        |
| Others           |     -     | Format: DDDDDDDDDD-D or DDDDDDDDDDD where D are digits. The number of digits may change, but can't exceed 20 digits                                  | <p>123456789, 123456789-0,<br>123456789012345689</p>   |

## Bank Branch Validations

<table data-header-hidden><thead><tr><th>Bank name</th><th width="174" align="center">Bank code</th><th>Format</th><th></th><th data-hidden>Exceptions</th></tr></thead><tbody><tr><td>Bank name</td><td align="center">Bank code</td><td>Format</td><td>Example</td><td>Exceptions</td></tr><tr><td>Banco do Brasil</td><td align="center">001</td><td>Format: DDDD-X or DDDDX where D are digits and X is a digit or the letter 'X'. The number of digits may change, but can't exceed 5 digits</td><td>1234-1, 12341, 1234-X</td><td><p>Can't have 4 zeros and a digit.</p><p></p><p><code>^0{0,4}(-)?[\dxX]$</code></p></td></tr><tr><td>Santander</td><td align="center">033</td><td>Format: DDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td>1234, 12345</td><td><p>Can't be 033</p><p></p><p><code>^033$</code></p></td></tr><tr><td>Banrisul</td><td align="center">041</td><td>Format: DDDD or DDDD-D The number of digits may change, but can't exceed 5 digits</td><td>1234-1, 12341</td><td>N/A</td></tr><tr><td>Banco Inter</td><td align="center">077</td><td>Format: DDDD-D or DDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td>1234-1,  12341</td><td><p>Can't start with zeros followed by 77 </p><p></p><p><code>^0{0,3}77$</code></p></td></tr><tr><td>Caixa</td><td align="center">104</td><td>Format: DDDD-D or DDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td>1234-1, 12341</td><td><p>Can't be: 001/013/023/104</p><p></p><p><code>^001$|^013$|^023$|^104$</code></p></td></tr><tr><td>Banco Original</td><td align="center">212</td><td>Format: DDDDD-D or DDDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td>1234-1, 12341</td><td><p>Can't start with zeros followed by 212</p><p></p><p><code>^0{0,2}212$</code></p></td></tr><tr><td>Bradesco</td><td align="center">237</td><td>Format: DDDD-D or DDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td>1234-1, 12341</td><td><p>Can't be 237</p><p></p><p><code>^237$</code></p></td></tr><tr><td>Banco Nu Pagamento</td><td align="center">260</td><td>Format: DDDD-D or DDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td>1234-1, 12341</td><td><p>Can't start with zeros followed by 260</p><p></p><p><code>^0{0,2}260$</code></p></td></tr><tr><td>PagSeguro</td><td align="center">290</td><td>Format: DDD-D or DDDD where D are digits. The number of digits may change, but can't exceed 4 digits</td><td>123-4, 1234</td><td><p>Can't start with zeros followed by 290</p><p></p><p><code>^0{0,2}290$</code></p></td></tr><tr><td>Mercado Pago</td><td align="center">323</td><td><code>N/A</code></td><td>0001</td><td><code>N/A</code></td></tr><tr><td>Itau</td><td align="center">341</td><td>Format: DDDD-D or DDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td>1234-1, 12341</td><td><p>Can't be 314</p><p></p><p><code>^341$</code></p></td></tr><tr><td>Pix Key Phone</td><td align="center">10000</td><td>Format: "+55 012 92345-1234"</td><td>+55 66 666666666</td><td>N/A</td></tr><tr><td>Pix Key Email</td><td align="center">10001</td><td><code>N/A</code></td><td>testuser@gmail.com</td><td>N/A</td></tr><tr><td>Pix Key Document</td><td align="center">10002</td><td><code>N/A</code></td><td>N/A</td><td>N/A</td></tr><tr><td>Others</td><td align="center">-</td><td>Format: DDDD-D or DDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td>1234-1, 12341</td><td>N/A</td></tr></tbody></table>

## Account Types

The `account_type` is specified with only one character described below.

| `account_type` | Description       |
| :------------: | ----------------- |
|     **`C`**    | Checkings account |
|     **`S`**    | Savings account   |
|     **`P`**    | Payments account  |

[Click here](/knowledge-base/countries-specifications.md#documents-validations) to check document types and validations.

## Example Request

{% tabs %}
{% tab title="Banks" %}

```java
{
    "login": "xxxxxxx",
    "pass": "xxxxxxx",
    "external_id": "30000000001",
    "country": "BR",
    "currency": "BRL",
    "amount": 100,
    "document_id": "01716001340",
    "beneficiary_name": "User",
    "bank_account": "3423422-7",
    "bank_code": "001",
    "bank_branch": "1234",
    "account_type": "C",
    "notification_url": "https://webhook.site/url",
    "type": "json"
}
```

{% endtab %}

{% tab title="Pix Keys" %}

### Type of keys

| Bank             | Bank Code | Details                                                                                                                          |
| ---------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Pix Key Document | 10002     | `bank_account` and `bank_branch` must be empty. The field `acount_type` can have any value. The field `document_id` must be sent |

If a payout is created without `document_id` , it will get REJECTED.

### Example Requests

{% code title="Pix Key Document" %}

```java
{
    "login": "xxxxxxx",
    "pass": "xxxxxxx",
    "external_id": "30000000001",
    "country": "BR",
    "currency": "BRL",
    "amount": 100,
    "document_id": "01716001340",
    "beneficiary_name": "User",
    "bank_code": "10002",
    "bank_account": "",
    "bank_branch": "",
    "account_type": "C",
    "notification_url": "https://webhook.site/url",
    "type": "json"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Types of Keys

| Bank             | Bank Code | Bank Details                                                                                                                                                   |
| ---------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Pix Key Phone    | 10000     | `bank_account` and `bank_branch` must be empty. The field `acount_type` can have any value. The field phone must be sent                                       |
| Pix Key Email    | 10001     | `bank_account` and `bank_branch` must be empty. The field `acount_type` can have any value. The field email must be sent                                       |
| Pix Key Document | 10002     | `bank_account` and `bank_branch` must be empty. The field `acount_type` can have any value. The field `document_id` must be sent                               |
| Pix Key Random   | 10003     | `bank_branch` must be empty. The field `account_type` can have any value. The field `bank_account` must be sent - this indicates the customer's PIX random key |

If a payout is created without the mandatory fields, it will be rejected.<br>

{% tabs %}
{% tab title="Pix Key Phone" %}

```json
{    
    "login": "xxxxxxx",
    "pass": "xxxxxxx",
    "external_id": "30000000001",
    "country": "BR",
    "currency": "BRL",
    "amount": 100,
    "document_id": "01716001340",
    "beneficiary_name": "User",
    "phone": "+5511666666666"
    "bank_code": "10000",
    "bank_account": "",
    "bank_branch": "",
    "account_type": "C",
    "notification_url": "https://webhook.site/url",
    "type": "json"
}
```

{% endtab %}

{% tab title="Pix Key Email" %}

```json
{    
    "login": "xxxxxxx",
    "pass": "xxxxxxx",
    "external_id": "30000000001",
    "country": "BR",
    "currency": "BRL",
    "amount": 100,
    "document_id": "01716001340",
    "email": "testuser@gmail.com",
    "beneficiary_name": "User",
    "bank_code": "10001",
    "bank_account": "",
    "bank_branch": "",
    "account_type": "C",
    "notification_url": "https://webhook.site/url",
    "type": "json"
}
```

{% endtab %}

{% tab title="Pix Key Document" %}

```json
{    
    "login": "xxxxxxx",
    "pass": "xxxxxxx",
    "external_id": "30000000001",
    "country": "BR",
    "currency": "BRL",
    "amount": 100,
    "document_id": "01716001340",
    "beneficiary_name": "User",
    "bank_code": "10002",
    "bank_account": "",
    "bank_branch": "",
    "account_type": "C",
    "notification_url": "https://webhook.site/url",
    "type": "json"
}
```

{% endtab %}
{% endtabs %}

### Registred bank accounts

For withdrawals, it is possible to send the registered accounts of a customer, before creating a cashout, you can find all the information [about the fields here](/api-documentation/cashouts-api/endpoints/cashout-creation-endpoint.md#request-fields-description), under the registered\_bank\_accounts object.\
\
You can have up to 3 bank accounts registered under this object.\
\
**Example**

```json
{
    "login": "xxxxxxx",
    "pass": "xxxxxxx",
    "external_id": "30000000001",
    "country": "BR",
    "currency": "BRL",
    "amount": 100,
    "document_id": "01716001340",
    "beneficiary_name": "User",
    "bank_account": "3423422-7",
    "bank_code": "001",
    "bank_branch": "1234",
    "registered_bank_accounts":  [
                 { 
                    "account_number": "3423422-7",
                    "ispb_code": "00000000",
                    "bank_code": "001",
                    "bank_branch": "1234"
                  },
                  { 
                    "account_number": "1234567",
                    "ispb_code": "90400888",
                    "bank_code": "33",
                    "bank_branch": "0199"
                   }
                  ],
    "account_type": "C",
    "notification_url": "https://webhook.site/url",
    "type": "json"
}
```

## Bank Codes

| Bank                                                    | Code  |
| ------------------------------------------------------- | ----- |
| BANCO DO BRASIL S.A.                                    | 001   |
| BANCO DA AMAZONIA S.A.                                  | 003   |
| BANCO DO NORDESTE DO BRASIL S.A.                        | 004   |
| BANESTES S.A. BANCO DO ESTADO DO ESPIRITO SANTO         | 021   |
| Banco Alfa S.A.                                         | 025   |
| BANCO SANTANDER BRASIL S.A.                             | 033   |
| BANCO ABN AMRO S.A                                      | 033   |
| BANCO DO ESTADO DO PARA S.A. - BANPARA                  | 037   |
| BANCO DO ESTADO DO RIO GRANDE DO SUL S.A. - BANRISUL    | 041   |
| BANCO DO ESTADO DE SERGIPE S.A. - BANESE                | 047   |
| BANCO DE BRASILIA S.A. - BRB                            | 070   |
| BANCO INTER                                             | 077   |
| Banco Original do Agronegócio S.A.                      | 079   |
| Cooperativa Central de Crédito (VIACREDI)               | 085   |
| POLOCRED SCMEPP                                         | 093   |
| Credisis - Central de Cooperativas de Crédito Ltdav     | 097   |
| XP INVESTIMENTOS S.A                                    | 102   |
| CAIXA ECONOMICA FEDERAL - CEF                           | 104   |
| Banco BOCOM BBM S.A.                                    | 107   |
| BANCO AGIPLAN S.A.                                      | 121   |
| Confederação Nacional das Cooperativas Centrais Unicred | 136   |
| Stone Pagamentos S.A                                    | 197   |
| Banco BTG Pactual S.A.                                  | 208   |
| BANCO ORIGINAL                                          | 212   |
| BANCO BONSUCESSO S.A.                                   | 218   |
| Banco Fibra S.A.                                        | 224   |
| BANCO BRADESCO S.A.                                     | 237   |
| NU PAGAMENTOS                                           | 260   |
| Will Financeira S.A.                                    | 280   |
| PagSeguro Internet S.A                                  | 290   |
| Banco BPP Instituição de Pagamento S/A                  | 301   |
| BANCO BMG S.A                                           | 318   |
| China Construction Bank Banco Múltiplo S.A.             | 320   |
| MERCADOPAGO.COM REPRESENTACOES LTDA.                    | 323   |
| BANCO BARI DE INVESTIMENTOS E FINANCIAMENTOS S.A        | 330   |
| BAcesso Soluções de Pagamento S.A                       | 332   |
| Banco Digio S.A                                         | 335   |
| BANCO C6 S.A                                            | 336   |
| ITAU UNIBANCO S.A.                                      | 341   |
| GERENCIANET S.A                                         | 364   |
| Banco Société Générale Brasil S.A.                      | 366   |
| PICPAY SERVICOS S.A                                     | 380   |
| BANCO MERCANTIL DO BRASIL S.A.                          | 389   |
| Banco Hub pagamentos SA                                 | 396   |
| HSBC BANK BRASIL S.A. - BANCO MULTIPLO                  | 399   |
| CORA SCD S.A                                            | 403   |
| BANCO SAFRA S.A.                                        | 422   |
| CITIBANK N.A.                                           | 477   |
| Deutsche Bank S.A. – Banco Alemão                       | 487   |
| JPMorgan Chase Bank, National Association               | 488   |
| ING Bank N.V.                                           | 492   |
| Banco Credit Suisse S.A.                                | 505   |
| Banco PAN S.A.                                          | 623   |
| BANCO SOFISA                                            | 637   |
| Banco Votorantim S.A.                                   | 655   |
| BANCO DAYCOVAL S.A.                                     | 707   |
| BANCO OURINVEST S.A                                     | 712   |
| BANCO CITIBANK                                          | 745   |
| BANCO MODAL S.A.                                        | 746   |
| Banco Rabobank International Brasil S.A.                | 747   |
| BANCO COOPERATIVO SICREDI S.A.                          | 748   |
| Banco BNP Paribas Brasil S.A.                           | 752   |
| BANCO COOPERATIVO DO BRASIL S/A - BANCOOB               | 756   |
| Pix Key Document                                        | 10002 |

{% hint style="info" %}
For the full and most up-to-date list of banks and its codes, please check the [Cashout Bank Code endpoint.](/api-documentation/cashouts-api/endpoints/cashout-bank-codes.md)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.onekeypayments.com/api-documentation/cashouts-api/countries-validations/american-countries/brazil.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
