1curl -X GET 'https://api.budpay.com/api/v2/wallet_balance/NGN' \2 -H 'Authorization: Bearer YOUR_SECRET_KEY'{ "success": true, "message": "Wallet Balance Fetched Successfully", "data": { "currency": "NGN", "balance": "2793.40555" }}Retrieve the available balance in your BudPay wallet for a specific currency. Use this endpoint to check available funds before initiating transfers or payouts.
GET https://api.budpay.com/api/v2/wallet_balance/{currency}Endpoint: GET https://api.budpay.com/api/v2/wallet_balance/NGN
1curl -X GET 'https://api.budpay.com/api/v2/wallet_balance/NGN' \2 -H 'Authorization: Bearer YOUR_SECRET_KEY'{ "success": true, "message": "Wallet Balance Fetched Successfully", "data": { "currency": "NGN", "balance": "2793.40555" }}Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
currency | String | Yes | Currency code: NGN, KES, GHS, or USD |
Header Parameters
| Field Name | Description | Required |
|---|---|---|
| Authorization | Bearer token with your secret key | Yes |
| Field | Type | Description |
|---|---|---|
success | Boolean | Indicates if request was successful |
message | String | Response message |
data.currency | String | Currency code of the wallet |
data.balance | String | Available balance in the specified currency |
| Currency | Country | Description |
|---|---|---|
| NGN | Nigeria | Nigerian Naira |
| KES | Kenya | Kenyan Shilling |
| GHS | Ghana | Ghanaian Cedi |
| USD | International | US Dollar |
401 Unauthorized
{
"success": false,
"message": "Authentication failed"
}404 Not Found
{
"success": false,
"message": "Wallet not found for specified currency"
}422 Validation Error
{
"success": false,
"message": "Invalid currency code"
}Tip: Check wallet balance before initiating transfers to ensure sufficient funds and prevent failed transactions.
Planning: For bulk transfers, verify that balance ≥ (total_amount + total_fees) before processing.
Single Transfer Validation
Required Balance = Transfer Amount + Transaction Fee
Example: NGN 100 + NGN 10 = NGN 110Bulk Transfer Validation
Required Balance = Sum of All Amounts + Sum of All Fees
Example: (NGN 100 × 3) + (NGN 10 × 3) = NGN 330Balance Check Before Transfer
// Check balance
const balanceResponse = await getWalletBalance('NGN');
const availableBalance = parseFloat(balanceResponse.data.balance);
// Calculate required amount
const transferAmount = 100;
const transferFee = 10;
const requiredBalance = transferAmount + transferFee;
// Verify sufficient funds
if (availableBalance >= requiredBalance) {
// Proceed with transfer
await initiateBankTransfer(transferData);
} else {
// Handle insufficient balance
throw new Error('Insufficient wallet balance');
}Security: Never expose wallet balance information in client-side code or logs accessible to end users.