Bank Transfer Validation - Brazil

To process a payout via bank transfer in Brazil, you must provide the following fields:

  • bank: ISPB code (Identificador do Sistema de Pagamentos Brasileiro)
  • branch: Agência (branch code)
  • number: Account number

Each of these fields must follow strict format requirements depending on the destination bank.

Bank Code (ISPB)

PagSeguro uses the ISPB (Identificador do Sistema de Pagamentos Brasileiro) code to identify financial institutions (bank field). This is not the same as the COMPE code used in TED/DOC transfers. You can reference ISPB values and mappings to COMPE accessing Banco Central ISPB Dataset.

Branch Format

The branch code is typically 4 digits. Some banks may require a check digit, which should be separated by a hyphen (-) if present:

  • 1234
  • 1234-5

Account Number Format

Brazilian account numbers may differ by bank. A general format is:

^(?:\d{6,14}|(?=\d+-\d+$)[\d\-]{6,14})$

However, many banks have custom formats.

Banks Validation Data

Below is a partial list of major banks and their required formats:

Bank NameISPB CodeAccount Branch FormatAccount Branch RegexAccount Number FormatAccount Number Regex
Itaú Unibanco607011904 digits-5 digits + 1 check digit or

7 digits + 1 check digit
^([0-9]{5}|[0-9]{7})-?[0-9]{1}$
Bradesco607469484 digits + 1 optional check digit(^[0-9]{4,5}$)|(^[0-9]{4}-[0-9]{1}$)7 digits + 1 check digit^[0-9]{7}-[0-9]{1}$
Banco do Brasil000000004 digits + 1 optional check digit(^[0-9]{4,5}$)|(^[0-9]{4}-[0-9]{1}$)8 digits + 1 check digit or

9 digits + 1 check digit or

5 digits + 1 check digit
^([0-9]{5}|[0-9]{8,9})-?[0-9]{1}$
Caixa Econômica Federal003603054 digits-8 digits + 1 check digit or

9 digits + 1 check digit or

12 digits + 1 check digit
(^[0-9]{8}-?[0-9]{1}$)|(^[0-9]{9}-?[0-9]{1}$)|(^[0-9]{12}-?[0-9]{1}$)
Santander904008884 digits-8 digits + 1 check digit^[0-9]{8}-[0-9]{1}$
Sicoob020382324 digits-10 digits + 1 check digit^[0-9]{10}-[0-9]{1}$
BTG Pactual303062943 digits-6 digits + 1 check digit^[0-9]{6}-[0-9]{1}$
Banco Safra581607894 digits-7 digits + 1 check digit^[0-9]{7}-[0-9]{1}$
Banco Votorantim (BV)595881113 digits-8 digits + 1 check digit^[0-9]{8}-[0-9]{1}$
Banrisul927020674 digits + 1 optional check digit(^[0-9]{4,5}$)|(^[0-9]{4}-[0-9]{1}$)9 digits + 1 check digit^[0-9]{9}-[0-9]{1}$
Citibank330429534 digits + 1 optional check digit(^[0-9]{4,5}$)|(^[0-9]{4}-[0-9]{1}$)7 digits + 1 check digit^[0-9]{7}-[0-9]{1}$
Banco do Nordeste72373734 digits-7 digits + 1 check digit^[0-9]{7}-[0-9]{1}$
Banco Original928949224 digits-9 digits + 1 check digit^[0-9]{9}-[0-9]{1}$
Pagbank (PagSeguro)085617014 digits-8 digits + 1 check digit^[0-9]{8}-[0-9]{1}$
Nubank182361204 digits-8 digits + 1 check digit^[0-9]{8}-[0-9]{1}$
Mercado Pago105735214 digits-9 digits + 1 check digit^[0-9]{9}-[0-9]{1}$
AME Digital327783504 digits-9 digits + 1 check digit^[0-9]{9}-[0-9]{1}$
C6 Bank318724954 digits-8 digits + 1 check digit^[0-9]{8}-[0-9]{1}$
Banco Inter004169684 digits-8 digits + 1 check digit^[0-9]{8}-[0-9]{1}$