Argentina CBU Validation

CBU (Clave Bancaria Uniforme) is a 22-digit number used to identify bank accounts in Argentina. It is the standard domestic account identifier used to route transfers to the correct bank branch and account.

A CBU consists of 22 digits and contains the bank code (3 digits), branch code (4 digits), one check digit for the bank and branch block, account number (13 digits), and a final check digit for the account block.

For example, CBU number 2850590912345678901233:

  • 285 - bank code
  • 0590 - branch code
  • 9 - bank and branch block check digit
  • 1234567890123 - account number
  • 3 - account block check digit

When you send money using an invalid CBU, the payment may fail or be delayed while the bank reverses the transfer. Using our flexible and fast RESTful API you can validate a CBU and receive parsed account information together with the matching Argentina bank record from our database.

How to validate a CBU

To start using our Fin Codes API sign up here and create your API key. Pass this key either via x-api-key HTTP header or via api_key query param.

Because a CBU identifies a specific bank account, it is considered personally identifiable information (PII) and must not appear in URLs or access logs. That is why CBU validation uses the POST method with the CBU passed in the JSON request body.

To validate a CBU call /v2/cbu endpoint with the POST method and include the cbu in the request body:

curl 'https://api.fincodesapi.com/v2/cbu' \
    --request POST \
    --header 'X-Api-Key: your-api-key-here' \
    --header 'Accept: application/json' \
    --header 'Content-Type: application/json' \
    --data '{"cbu":"2850590912345678901233"}'
# INSTALLATION
$ composer require guzzlehttp/guzzle
# REQUEST
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fincodesapi.com/v2/cbu', [
    'headers' => [
        'Accept' => 'application/json',
        'X-Api-Key' => 'your-api-key-here',
    ],
    'json' => [
        'cbu' => '2850590912345678901233',
    ],
]);

echo $response->getBody();
# INSTALLATION
$ python -m pip install requests
# REQUEST
import requests

url = "https://api.fincodesapi.com/v2/cbu"

headers = {
    "Accept": "application/json",
    "X-Api-Key": "your-api-key-here"
}

payload = {
    "cbu": "2850590912345678901233"
}
response = requests.request("POST", url, json=payload, headers=headers)

print(response.text)
# INSTALLATION
$ npm install node-fetch --save
// REQUEST
import fetch from 'node-fetch';

const url = 'https://api.fincodesapi.com/v2/cbu';
const options = {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'X-Api-Key': 'your-api-key-here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    'cbu': '2850590912345678901233'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
const options = {
  method: 'POST',
  headers: {
    'Accept': 'application/json',
    'X-Api-Key': 'your-api-key-here',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    'cbu': '2850590912345678901233'
  })
};

fetch('https://api.fincodesapi.com/v2/cbu', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

The response should be:

{
    "success": true,
    "data": {
        "id": "2850590912345678901233",
        "account_number": "1234567890123",
        "branch_code": "0590",
        "bank": {
            "id": "f1f5b5a8-c83d-4d9b-8224-0a1a2f5c0d62",
            "country_id": "AR",
            "code": "285",
            "name": "Banco Macro"
        }
    }
}

You can find full documentation here.