Get Ledger Overview
Retrieve a comprehensive ledger overview including account balances, totals, and the latest daily summary.
GET
https://api.zenpayz.com/merchant/api/v1/ledger/overviewBearer · 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) |
startDate OPTIONAL | string- | Start date for period (YYYY-MM-DD) |
endDate OPTIONAL | string- | End date for period (YYYY-MM-DD) |
Response
Success (200 OK)
{
"success": true,
"data": {
"balances": [
{
"accountCategory": "MERCHANT_AVAILABLE",
"currency": "INR",
"balance": 10000
},
{
"accountCategory": "MERCHANT_PENDING",
"currency": "INR",
"balance": 2500
},
{
"accountCategory": "MERCHANT_BLOCKED",
"currency": "INR",
"balance": 500
}
],
"totalAvailable": 10000,
"totalPending": 2500,
"totalBlocked": 500,
"totalReserved": 1000,
"currency": "INR",
"latestSummary": {
"summaryId": "sum_xxxxx",
"summaryDate": "2024-01-15",
"merchantId": "mer_xxxxx",
"currency": "INR",
"openingAvailableBalance": 8000,
"closingAvailableBalance": 10000,
"totalDepositsGross": 5000,
"totalDepositsNet": 4750,
"depositCount": 10,
"totalPayouts": 2000,
"payoutCount": 2,
"netMovement": 2000,
"isFinalized": true
}
},
"message": "Ledger overview retrieved successfully"
}
Account Categories
| Category | Description |
|---|---|
MERCHANT_AVAILABLE | Funds available for withdrawal/payout |
MERCHANT_PENDING | Funds being processed (incoming payments) |
MERCHANT_BLOCKED | Funds blocked for pending operations |
RESERVE_PAYOUT | Reserved for pending payouts |
RESERVE_RISK | Risk reserve allocation |
RESERVE_CHARGEBACK | Chargeback reserve allocation |
Examples
- cURL
- SDK
curl -X GET "https://api.zenpays.com/merchant/api/v1/ledger/overview?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 overview = await zenpays.ledger.getOverview({ currency: 'INR' });
console.log(`Available: ${overview.totalAvailable}`);
console.log(`Pending: ${overview.totalPending}`);
console.log(`Reserved: ${overview.totalReserved}`);