Get Ledger Accounts
Retrieve all ledger accounts for the merchant. This is an alias for ledger balances with a semantic focus on account listing.
GET
https://api.zenpayz.com/merchant/api/v1/ledger/accountsBearer · 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 |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
currency OPTIONAL | string- | Filter by currency code (e.g., INR, USD) |
Response
Success (200 OK)
{
"success": true,
"data": [
{
"accountCategory": "MERCHANT_AVAILABLE",
"currency": "INR",
"balance": 10000
},
{
"accountCategory": "MERCHANT_PENDING",
"currency": "INR",
"balance": 2500
},
{
"accountCategory": "MERCHANT_BLOCKED",
"currency": "INR",
"balance": 500
},
{
"accountCategory": "RESERVE_PAYOUT",
"currency": "INR",
"balance": 1000
},
{
"accountCategory": "RESERVE_RISK",
"currency": "INR",
"balance": 250
}
],
"message": "Ledger accounts retrieved successfully"
}
Account Categories
| Category | Description |
|---|---|
MERCHANT_AVAILABLE | Funds available for withdrawal/payout |
MERCHANT_PENDING | Funds being processed (incoming payments not yet settled) |
MERCHANT_BLOCKED | Funds blocked for pending operations (payouts, settlements) |
COLLECTION_POOL | Pool for collecting incoming payments |
ADMIN_WALLET | Administrative wallet for platform operations |
RESERVE_PAYOUT | Reserved funds for pending payout operations |
RESERVE_RISK | Risk reserve allocation based on merchant risk profile |
RESERVE_CHARGEBACK | Funds reserved for potential chargebacks |
TSP_PAYABLE | Amounts payable to third-party service providers |
SYSTEM_SUSPENSE | Suspense account for unreconciled transactions |
Examples
- cURL
- SDK
curl -X GET "https://api.zenpays.com/merchant/api/v1/ledger/accounts?currency=INR" \
-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 accounts = await zenpays.ledger.getAccounts({ currency: 'INR' });
// List all accounts
accounts.forEach(account => {
console.log(`${account.accountCategory}: ${account.balance} ${account.currency}`);
});
// Get specific account type
const reserveAccounts = accounts.filter(a => a.accountCategory.startsWith('RESERVE_'));
console.log('Reserve accounts:', reserveAccounts);