Get an account's closing balance
curl --request GET \
--url https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balanceimport requests
url = "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "a1f3c5e7-9b2d-4f6a-8c0e-1d3f5a7b9c2e",
"balance": 4875000,
"bagsBalance": 4875000,
"referenceDate": "20261031"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "ACCOUNT_NOT_FOUND",
"origin": "BANKING",
"message": "Account not found"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "BANKING",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "date",
"message": "Invalid input: expected string, received undefined",
"code": "DATE_REQUIRED"
}
]
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider temporarily unavailable, please retry"
}Get an account's closing balance
Returns the balance an account had at the end of a day.
GET
/
realms
/
{realmId}
/
organizations
/
{organizationId}
/
accounts
/
{accountId}
/
balance
Get an account's closing balance
curl --request GET \
--url https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balanceimport requests
url = "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.banking.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/accounts/{accountId}/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "a1f3c5e7-9b2d-4f6a-8c0e-1d3f5a7b9c2e",
"balance": 4875000,
"bagsBalance": 4875000,
"referenceDate": "20261031"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "ACCOUNT_NOT_FOUND",
"origin": "BANKING",
"message": "Account not found"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "BANKING",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "date",
"message": "Invalid input: expected string, received undefined",
"code": "DATE_REQUIRED"
}
]
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BANKING_PROVIDER_UNAVAILABLE",
"origin": "BANKING",
"message": "Banking provider temporarily unavailable, please retry"
}Send the day as
date (YYYY-MM-DD). The statement comes from the bank: balance is the account’s closing balance and bagsBalance the total of its wallets’ closing balances, both in cents. Send x-environment: LIVE for the production account.
Any member of the organization can read it.Headers
Environment of the account: LIVE (production) or TEST (sandbox). When you omit it, the request runs in TEST; any other value is rejected.
Available options:
LIVE, TEST Path Parameters
ID of your realm.
Format: UUID
ID of the organization the account belongs to.
Format: UUID
ID of the account (24 hexadecimal characters).
Pattern:
^[0-9a-fA-F]{24}$Query Parameters
Day whose closing balance you read, as YYYY-MM-DD (YYYYMMDD is accepted too).
Pattern:
^(\d{4}-\d{2}-\d{2}|\d{8})$Response
Successful response
The balance an account had at the end of a day.
Identifier of this balance statement.
Example:
"a1f3c5e7-9b2d-4f6a-8c0e-1d3f5a7b9c2e"
Balance the account held at the end of the day, in cents.
Example:
4875000
Sum of the account's wallets' balances at the end of the day, in cents.
Example:
4875000
The day of the balance, as YYYYMMDD.
Example:
"20261031"