GET
/api/v1/balance
Wallet
Wallet Balance
Retrieve your live available virtual wallet balance and settled funds. Used before initiating payouts or for internal accounting reconciliation.
Code Example
curl -X GET https://hivepay.site/api/v1/balance \ -H "X-API-Key: YOUR_API_KEY" \ -H "X-API-Secret: YOUR_API_SECRET" \ -H "X-Account-Number: YOUR_ACCOUNT_NUMBER"
<?php
$ch = curl_init('https://hivepay.site/api/v1/balance');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: ' . getenv('HIVEPAY_API_KEY'),
'X-API-Secret: ' . getenv('HIVEPAY_API_SECRET'),
'X-Account-Number: ' . getenv('HIVEPAY_ACCOUNT_NO'),
'Accept: application/json'
]
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
echo "Balance: " . number_format($data['wallet_balance']) . " " . $data['currency'];
const response = await fetch('https://hivepay.site/api/v1/balance', {
headers: {
'X-API-Key': process.env.HIVEPAY_API_KEY,
'X-API-Secret': process.env.HIVEPAY_API_SECRET,
'X-Account-Number': process.env.HIVEPAY_ACCOUNT_NO,
'Accept': 'application/json'
}
});
const data = await response.json();
console.log(`Balance: ${data.wallet_balance} ${data.currency}`);
import os, requests
res = requests.get(
'https://hivepay.site/api/v1/balance',
headers={
'X-API-Key': os.getenv('HIVEPAY_API_KEY'),
'X-API-Secret': os.getenv('HIVEPAY_API_SECRET'),
'X-Account-Number': os.getenv('HIVEPAY_ACCOUNT_NO')
}
)
data = res.json()
print(f"Balance: {data['wallet_balance']} {data['currency']}")
Response (200 OK)
Response JSON
{
"success": true,
"wallet_balance": 350000,
"currency": "UGX"
}