Get Account Balance
Check your account balance and available funds
Get Account Balance
Retrieve your current account balance including payout balance, collection balance, and SMS balance.
Endpoint
POST https://api.bridgeagw.com/get_account_balanceRequest Headers
Authorization: Basic <base64_encoded_credentials>
Content-Type: application/jsonRequest Body
{
"service_id": 1,
"request_time": "2025-08-31 23:35"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service_id | integer | Yes | Your service identifier |
request_time | string | Yes | Request timestamp |
Response
Success Response (200)
{
"response_data": {
"payout_balance": 19.1,
"collection_balance": 0.37,
"sms_balance": 0.0
},
"response_message": "Success",
"response_code": "000"
}Response Fields
| Field | Type | Description |
|---|---|---|
payout_balance | number | Available balance for payouts |
collection_balance | number | Available balance for collections |
sms_balance | number | Available balance for SMS services |
Example Usage
curl -X POST "https://api.bridgeagw.com/get_account_balance" \
-H "Authorization: Basic <your_credentials>" \
-H "Content-Type: application/json" \
-d '{
"service_id": 1,
"request_time": "2025-08-31 23:35"
}'const response = await fetch('https://api.bridgeagw.com/get_account_balance', {
method: 'POST',
headers: {
'Authorization': 'Basic <your_credentials>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service_id: 1,
request_time: "2025-08-31 23:35"
})
});
const result = await response.json();
console.log(result);import requests
url = "https://api.bridgeagw.com/get_account_balance"
headers = {
"Authorization": "Basic <your_credentials>",
"Content-Type": "application/json"
}
data = {
"service_id": 1,
"request_time": "2025-08-31 23:35"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)Balance Types
Payout Balance
The amount available for making payments to customers or other parties. This balance is used when:
- Making mobile money transfers
- Processing card payments
- Sending money to bank accounts
Collection Balance
The amount available for collecting payments from customers. This balance is used when:
- Receiving payments from customers
- Processing incoming transactions
SMS Balance
The amount available for sending SMS messages. This balance is used when:
- Sending verification codes
- Sending transaction notifications
- Sending promotional messages
Error Handling
If the request fails, you'll receive an error response with appropriate error codes. Common errors include:
- 401 Unauthorized: Invalid authentication credentials
- 400 Bad Request: Missing or invalid parameters
- 500 Internal Server Error: Server-side error
Sandbox testing
In sandbox mode, balances are mocked — no real ledger is queried. The service_id value in your request controls which mock balance set is returned.
| Scenario | service_id | collection_balance | payout_balance | sms_balance |
|---|---|---|---|---|
| Default (any id) | e.g. 12345 | 100000 | 10000 | 500 |
| Low balance | any id ending in 9, e.g. 12349 | 10.0 | 5.0 | 0 |
There is no phone number field on this endpoint. All four balance fields (collection_balance, payout_balance, sms_balance, airtime_balance) are populated in the sandbox response.
Notes
- Balance amounts are returned in the account's base currency
- Balances are updated in real-time
- You can check your balance at any time without affecting your account
- All balance values are returned as numbers with appropriate decimal places