Bridge API DocsBridge API Docs
Bridge API Docs
Api reference

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_balance

Request Headers

Authorization: Basic <base64_encoded_credentials>
Content-Type: application/json

Request Body

{
  "service_id": 1,
  "request_time": "2025-08-31 23:35"
}

Parameters

ParameterTypeRequiredDescription
service_idintegerYesYour service identifier
request_timestringYesRequest 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

FieldTypeDescription
payout_balancenumberAvailable balance for payouts
collection_balancenumberAvailable balance for collections
sms_balancenumberAvailable balance for SMS services

Example Usage

cURL

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"
  }'

JavaScript

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);

Python

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

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