Check Balance
Queries the available balance of a company. Balance amounts are always in reais (R$ 25.00 = 25.00).
GET
/api/Balance/balance/{companyId}?currency=BRLSend X-Client-Id and X-API-Key. companyId is your company ID (UUID). With an API key only your own company is accepted; any other ID returns 403 with {"message":"API Key não pode acessar outra empresa."}.
Response (200 OK)
Response
{ "id": 0, "currency": "BRL", "acquirer": "ALL", "enBalanceStatus": "0", "accBalance": 5.00, "accBalanceCredit": 0.00, "accBalanceCreditAwaiting": 0.00}Response Fields
| Parameter | Type | Description |
|---|---|---|
id | integer | Internal balance row identifier. In the consolidated response it is 0; do not use it as a company ID |
currency | string | Currency (BRL) |
acquirer | string | Balance acquirer. In the consolidated response (default) it is ALL |
enBalanceStatus | string | Internal balance status code, returned as a string ("0" in the consolidated response). Not needed for integrations |
accBalance | number | Available balance in reais |
accBalanceCredit | number | Available credit |
accBalanceCreditAwaiting | number | Credit awaiting release |
idinteger
Internal balance row identifier. In the consolidated response it is 0; do not use it as a company ID
currencystring
Currency (BRL)
acquirerstring
Balance acquirer. In the consolidated response (default) it is ALL
enBalanceStatusstring
Internal balance status code, returned as a string ("0" in the consolidated response). Not needed for integrations
accBalancenumber
Available balance in reais
accBalanceCreditnumber
Available credit
accBalanceCreditAwaitingnumber
Credit awaiting release
JavaScript Example
JavaScript
const companyId = '2f3c1c0e-6a52-4a0f-9d34-6a7b3f6f2b10'; // your company ID (UUID)const currency = 'BRL';const response = await fetch( `https://api.respawnpay.com/api/Balance/balance/${companyId}?currency=${currency}`, { method: 'GET', headers: { 'Accept': 'application/json', 'X-Client-Id': 'fbd6b0c9e4b8331b77700ca6e17972b5', 'X-API-Key': 'your-secret-api-key' } });const balance = await response.json();console.log('Available balance:', balance.accBalance);