This API retrieves the current balance information for a specific bank account. The response includes total balance, blocked amounts, scheduled amounts, and available balance for operations.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Endpoint
GET /v2/finance/get-balance
Headers
| Parameter | Type | Description | Example |
|---|---|---|---|
| Authorization | String | Bearer + Access_token | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo |
| hmac | String | HMAC (Hash-based Message Authentication Code) is an authentication algorithm that combines a private key with a message to create a Message Authentication Code (MAC). | hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b99f4081ff231b87f82118c1e77a959e1f40eacf690a8fa61a827a9ba01d546f6 |
Query Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| account_branch_identifier | String | Branch/agency number of the account | Yes |
| account_number | String | Account number to query balance | Yes |
Request Examples
Get account balance:
GET /v2/finance/get-balance?account_branch_identifier=0001&account_number=12345678-9
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...Another account example:
GET /v2/finance/get-balance?account_branch_identifier=1234&account_number=98765432-1
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...Response Details
{
"worked": true,
"amount": 14501.25,
"amount_available": 14501.25,
"amount_total": 15000.50,
"amount_blocked": 499.25,
"amount_schedule": 0.00,
"last_update": "2026-06-02T10:30:00Z",
"account_branch": "0001",
"account_number": "12345678-9"
}| Field | Type | Description |
|---|---|---|
| worked | Boolean | Always returns true when the request is successful |
| amount | Float | Amount available for operations (calculated as: total - blocked). This is the actual spendable balance. Always greater than or equal to 0.00. |
| amount_available | Float | Same as amount. Amount available for operations. Always greater than or equal to 0.00. |
| amount_total | Float | Total balance in the account, including blocked amounts. Can be negative in overdraft scenarios. |
| amount_blocked | Float | Amount currently blocked/reserved in the account. This amount is not available for transactions. Always greater than or equal to 0.00. |
| amount_schedule | Float | Amount scheduled for future transactions. Not included in available balance calculation. Always greater than or equal to 0.00. |
| last_update | DateTime | Timestamp of the last balance update. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ) |
| account_branch | String | Branch/agency number of the queried account |
| account_number | String | Account number of the queried account |
Balance Calculation:
amount_available = amount_total - amount_blocked
Important Notes:
- All amounts are returned in BRL (Brazilian Real)
- Values include 2 decimal places
- If
amount_availablecalculation results in a negative number, it is automatically set to 0.00 amount_totalcan be negative (overdraft scenarios), butamount_availableis always >= 0.00amount_scheduleis informational only and does not affectamount_available
Error Responses
| HTTP Code | Error Message | Description |
|---|---|---|
| 400 | Account not found | The account was not found or does not belong to your company. |
| 400 | Account is closed | The account exists but is closed. Closed accounts cannot have their balance queried. |
| 401 | Unauthorized | Invalid or missing authentication token. Ensure you are sending a valid Bearer token and HMAC signature. |
| 403 | Forbidden | Your user does not have the necessary permissions to access this account. |
| 404 | Account not found | The account does not exist. |
| 422 | Validation error | Required parameters are missing or invalid. Check that both account_branch_identifier and account_number are provided. |
Business Rules
Account Validation:
- Account must exist in the system
- Account must not be in closed status
- User must have permission to access this specific account
- Both branch identifier and account number are required
Blocked Amount:
- Blocked amounts represent funds that are reserved for pending transactions
- Common scenarios for blocked funds:
- PIX transactions awaiting confirmation
- Scheduled payments pending execution
- Pre-authorizations for future debits
- Temporary holds for security reasons
- Blocked amounts are not available for new transactions
Scheduled Amount:
- Scheduled amounts represent future transactions already scheduled
- Does not reduce the available balance until executed
- Informational field for planning purposes
- Helps prevent scheduling conflicts
Response Times:
- Balance queries may take 1-3 seconds for real-time data
- Last update timestamp indicates data freshness
- Consider caching balance information in your application for frequently accessed accounts
Use Cases
1. Display Account Balance:
Show the current account balance to users in dashboards or account summary pages.
2. Pre-Transaction Validation:
Check available balance before initiating a transaction to prevent insufficient funds errors.
3. Balance Monitoring:
Regularly poll this endpoint to monitor account balances for alerts or reporting.
4. Multi-Account Overview:
Query balances for multiple accounts to provide a consolidated view of financial position.
5. Transaction Limits:
Compare available balance against transaction amounts to calculate maximum possible transaction values.
Best Practices
Balance Display:
- Show all relevant values (total, blocked, available) for complete transparency
- Highlight when blocked amount is significant
- Format currency values properly (e.g., R$ 15.000,50)
- Handle negative total balances appropriately in your UI
- Display last update timestamp to show data freshness
Error Handling:
- Always handle the "Account is closed" error gracefully
- Implement retry logic for temporary failures (e.g., network timeouts)
- Cache the last known balance as a fallback during service interruptions
- Provide clear error messages to end users
Security:
- Never expose balance information in URLs or logs
- Use HTTPS for all balance queries
- Implement proper access controls in your application layer
- Mask or redact balance information in non-secure environments
- Do not store balance information longer than necessary
Performance:
- Consider caching balance responses for frequently accessed accounts
- Recommended polling frequency: once per minute maximum
- Use webhooks or real-time notifications when available for balance changes
- Implement request throttling to avoid rate limits
400Bad request - Account not found or closed
401Unauthorized - Invalid or missing authentication
403Forbidden - Insufficient permissions
404Account not found
422Validation error - Missing required parameters
500Internal server error
