Get Wallet Balances
Retrieve all wallet balances across currencies.
GET
https://api.zenpayz.com/merchant/api/v1/wallet/balancesBearer · API key
Request
Headers
| Header | Description |
|---|---|
Authorization REQUIRED | Bearer {api_key} |
X-Signature REQUIRED | HMAC-SHA256 signature |
X-Timestamp REQUIRED | ISO 8601 timestamp |
X-Secret-Salt REQUIRED | Secret salt for HMAC validation |
Response
Success (200 OK)
{
"success": true,
"data": [
{
"wallet_id": "wal_xxxxx",
"currency": "USD",
"currency_symbol": "$",
"available_balance": 250000,
"total_balance": 270000,
"blocked_balance": 5000,
"pending_balance": 15000,
"lifetime_balance": 1500000,
"lifetime_withdrawn": 1230000,
"status": "ACTIVE",
"last_transaction_at": "2024-01-15T10:30:00.000Z"
},
{
"wallet_id": "wal_yyyyy",
"currency": "INR",
"currency_symbol": "₹",
"available_balance": 5000000,
"total_balance": 5350000,
"blocked_balance": 100000,
"pending_balance": 250000,
"lifetime_balance": 25000000,
"lifetime_withdrawn": 19650000,
"status": "ACTIVE",
"last_transaction_at": "2024-01-15T10:30:00.000Z"
}
]
}
Balance Fields
| Parameter | Type | Description |
|---|---|---|
available_balance OPTIONAL | number | Funds available for withdrawal/payout |
total_balance OPTIONAL | number | Total balance including all holds |
blocked_balance OPTIONAL | number | Funds blocked for disputes/reserves |
pending_balance OPTIONAL | number | Funds being processed (incoming payments) |
lifetime_balance OPTIONAL | number | Total funds ever received |
lifetime_withdrawn OPTIONAL | number | Total funds ever withdrawn |
currency OPTIONAL | string | ISO 4217 currency code |
currency_symbol OPTIONAL | string | Display symbol for the currency |
last_transaction_at OPTIONAL | string | ISO 8601 timestamp of last wallet activity |
status OPTIONAL | string | Wallet status |
Examples
- cURL
- SDK
curl -X GET "https://api.zenpayz.com/merchant/api/v1/wallet/balances" \
-H "Authorization: Bearer zp_test_xxxxx" \
-H "X-Timestamp: 2024-01-15T10:30:00.000Z" \
-H "X-Signature: a1b2c3d4e5f6..." \
-H "X-Secret-Salt: your_secret_salt"
const balances = await zenpays.wallet.getAllBalances();
balances.forEach(b => {
console.log(`${b.currency}: ${b.available} available`);
});