Balances
Check account balance and use it operationally in Cobru integrations.
The balance endpoint is documented in legacy Cobru materials. The route is useful, but the full contract still needs a fresh sandbox verification pass.
Endpoint
GET /balance/
Typical use cases
- pre-flight checks before transfers or withdrawals
- dashboard balance synchronization
- reconciliation and treasury views
Response shape seen in legacy docs
{
"balance": "14179.25",
"balance_cop": "14179.25",
"balance_usd": "9995.00",
"balance_ars": "10000.00",
"balance_mxn": "96536.31",
"balance_brl": "89772737.20"
}Example request
curl -X GET https://dev.cobru.co/balance/ \
-H "x-api-key: $COBRU_API_KEY" \
-H "Authorization: Bearer $COBRU_ACCESS_TOKEN"const response = await fetch('https://dev.cobru.co/balance/', {
method: 'GET',
headers: {
'x-api-key': process.env.COBRU_API_KEY!,
Authorization: `Bearer ${accessToken}`,
},
});
const balance = await response.json();
console.log(balance.balance_cop);import requests
response = requests.get(
"https://dev.cobru.co/balance/",
headers={
"x-api-key": COBRU_API_KEY,
"Authorization": f"Bearer {access_token}",
},
)
print(response.json())<?php
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request('GET', 'https://dev.cobru.co/balance/', [
'headers' => [
'x-api-key' => getenv('COBRU_API_KEY'),
'Authorization' => 'Bearer ' . $accessToken,
],
]);
$balance = json_decode((string) $response->getBody(), true, 512, JSON_THROW_ON_ERROR);
var_dump($balance);