# 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](https://docs.pandablue.com/specifications/countries-specifications#documents-validations) | Beneficiary's CPF.                                                                                                |
| `country`          | `BR`                                                                                                                 | See [country codes](https://docs.pandablue.com/specifications/countries-specifications#countries-and-currencies)  |
| `currency`         | `BRL` / `USD`                                                                                                        | See [currency codes](https://docs.pandablue.com/specifications/countries-specifications#countries-and-currencies) |
| `amount`           | Number with up to 2 decimals                                                                                         | Cashout amount                                                                                                    |
| `bank_code`        | See [bank codes](#bank-codes)                                                                                        | Code specifying the beneficiary's bank                                                                            |
| `bank_account`     | See [validations below](#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](#account-types)                                                                             | Beneficiary's bank account type                                                                                   |
| `beneficiary_name` | String (max length: 100)                                                                                             | Beneficiary's name                                                                                                |

## Bank Account Validations

Use the Regex below to validate the bank accounts on your end.

| Bank name        | Bank code | Format                                                                                                                                               | Regex                 | 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 | `^\d{1,9}(-)?[\dxX]$` | 1234567890, 123456789-0, 123456789-X, 123456789X       |
| Santander        |    033    | Format: DDDDDDDD, DDDDDDDDD, DDDDDDDD-D, DDDDDDDD-D where D are digits. The number of digits has to be 8 or 9                                        | `^\d{7,8}(-)?[\d]$`   | 12345678, 12345678-9                                   |
| Banrisul         |    041    | Format: DDDDDDDDD-D or DDDDDDDDDD where D are digits. The number of digits has to be 10                                                              | `^\d{9}(-)?[\d]$`     | 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 15                                          | `^\d{1,14}(-)?[\d]$`  | <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                                         | `^\d{1,7}(-)?[\d]$`   | 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                                  | `^\d{1,9}(-)?[\d]$`   | 12345678910, 1234567891-0                              |
| Itaú             |    341    | Format: DDDDD-D or DDDDDD where D are digits. The number of digits may change, but can't exceed 6 digits                                             | `^\d{1,5}(-)?[\d]$`   | 123456, 12345-6                                        |
| Pix Key Document |   10002   | Empty string                                                                                                                                         | `^$`                  | ""                                                     |
| Others           |     -     | Format: DDDDDDDDDD-D or DDDDDDDDDDD where D are digits. The number of digits may change, but can't exceed 11 digits                                  | `^\d{1,9}(-)?[\d]$`   | 123456789, 123456789-0                                 |

## Bank Branch Validations

Use the Regex below to validate the valid (and invalid) bank branches on your end.

<table data-header-hidden><thead><tr><th>Bank name</th><th width="174" align="center">Bank code</th><th>Format</th><th width="216">Regex</th><th>Exceptions</th><th></th></tr></thead><tbody><tr><td>Bank name</td><td align="center">Bank code</td><td>Format</td><td>Regex</td><td>Exceptions</td><td>Example</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><code>^\d{1,4}(-)?[\dxX]$</code></td><td><p>Can't have 4 zeros and a digit.</p><p></p><p><code>^0{0,4}(-)?[\dxX]$</code></p></td><td>1234-1, 1234-X, 12341, 1234X</td></tr><tr><td>Santander</td><td align="center">033</td><td>Format: DDDDDDDDD, DDDDDDDDDD, DDDDDDDDD-D, DDDDDDDDD-D where D are digits. The number of digits may change, but will range from 9 to 10</td><td><code>^\d{7,10} (-)?[\d]$</code></td><td><p>Can't be 033</p><p></p><p><code>^033$</code></p></td><td>1234</td></tr><tr><td>Banrisul</td><td align="center">041</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><code>^\d{1,4}(-)?[\dxX]$</code></td><td>N/A</td><td>1234-1, 1234-X, 12341, 1234X</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><code>^\d{1,4}(-)?[\d]$</code></td><td><p>Can't start with zeros followed by 77 </p><p></p><p><code>^0{0,3}77$</code></p></td><td>1234-1,  12341</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><code>^\d{1,4}(-)?[\d]$</code></td><td><p>Can't be: 001/013/023/104</p><p></p><p><code>^001$|^013$|^023$|^104$</code></p></td><td>1234-1, 12341</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><code>^\d{1,4}(-)?[\d]$</code></td><td><p>Can't start with zeros followed by 212</p><p></p><p><code>^0{0,2}212$</code></p></td><td>1234-1, 12341</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><code>^\d{1,4}(-)?[\d]$</code></td><td><p>Can't be 237</p><p></p><p><code>^237$</code></p></td><td>1234-1, 12341</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><code>^\d{1,4}(-)?[\d]$</code></td><td><p>Can't start with zeros followed by 260</p><p></p><p><code>^0{0,2}260$</code></p></td><td>1234-1, 12341</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><code>^\d{3}(-)?[\d]$</code></td><td><p>Can't start with zeros followed by 290</p><p></p><p><code>^0{0,2}290$</code></p></td><td>123-4, 1234</td></tr><tr><td>Mercado Pago</td><td align="center">323</td><td><code>N/A</code></td><td><code>N/A</code></td><td><code>N/A</code></td><td>0001</td></tr><tr><td>Itau</td><td align="center">341</td><td>Format: DDDDDD-D or DDDDDDD where D are digits. The number of digits may change, but can't exceed 5 digits</td><td><code>^\d{1,7} (-)?[\d]$</code></td><td><p>Can't be 314</p><p></p><p><code>^341$</code></p></td><td>1234-1, 12341</td></tr><tr><td>Pix Key Document</td><td align="center">10002</td><td><code>N/A</code></td><td><code>^$</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><code>^\d{1,4}(-)?[\d]$</code></td><td>N/A</td><td>1234-1, 12341</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       |
|     **`O`**    | Joint checkings       |
|     **`P`**    | Joint savings account |

[Click here](https://docs.pandablue.com/specifications/countries-specifications#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 %}

## 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.](https://docs.pandablue.com/api-documentation/cashouts-api/endpoints/cashout-bank-codes)
{% endhint %}
