/account/balance Account Balance Query API
Background
Queries the account balance, account state, and currency of the merchant corresponding to X-Merchant-Id. This endpoint is rate-limited to 60 QPS by default.
Endpoint
| Item | Value |
|---|---|
| Method | GET |
| Path | /account/balance |
| Content-Type | application/json |
| Purpose | Query the current merchant's account balance |
Access Requirements
Request Fields
For authentication headers, see Authentication.
This endpoint has no query parameters or request body. Compute Digest over an empty byte string.
Request Example
http
GET /account/balance HTTP/1.1
Host: api.example.com
X-Merchant-Id: 2492265300
X-Timestamp: 1787011200
X-Nonce: a9f3c1d47e8b9a2c4d1f9e8a7b6c5d4e
Digest: SHA-256=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Authorization: Signature keyId="v1",alg="ES256",headers="(request-target) x-timestamp x-nonce digest",signature="<BASE64_SIGNATURE>"Response Fields
The endpoint uses the standard status, msg, and data response structure.
| Field | Type | Returned | Description |
|---|---|---|---|
status | int | Yes | Response code |
msg | string | Yes | Response message corresponding to status. |
data | object | On success | Current merchant account balance; it may be omitted when signature validation or protocol parsing fails. |
data. | string | Yes | Usable balance in the currency's major unit, as a numeric string with two decimal places. |
data. | string | Yes | Balance pending settlement in the currency's major unit, as a numeric string with two decimal places. Note: the field is named frozen, but its meaning is the amount pending settlement, not frozen funds. |
data. | string | Yes | Bank account number. |
data. | string | Yes | Branch number, 4 digits. |
data. | string | Yes | Merchant ID this account belongs to, up to 64 characters. |
data. | string | Yes | Total balance in the currency's major unit, as a numeric string with two decimal places; totalBalance = balance + frozen + frozenBalance. |
data. | string | Yes | Frozen balance in the currency's major unit, as a numeric string with two decimal places; this is the truly frozen amount, unlike the pending-settlement amount named frozen. |
data. | string | Yes | Account state. See the enum below. |
data. | string | Yes | ISO 4217 three-letter account currency code, such as BRL. |
accountState Enum
| Value | Description |
|---|---|
na | Not activated. |
a | Active. |
fi | Collections prohibited. |
fo | Payouts prohibited. |
f | Frozen; both collections and payouts are prohibited. |
c | Closed. |
Response Example
json
{
"status": 200,
"msg": "sucesso",
"data": {
"merchantNo": "2492265300",
"balance": "15083884116.35",
"frozen": "100329.00",
"bankAccount": "401050",
"bankBranch": "0001",
"totalBalance": "15083984445.35",
"frozenBalance": "0.00",
"accountState": "a",
"currency": "BRL"
}
}