Get Daily Ledger Summary
Retrieve the daily ledger summary for a specific date. This provides a comprehensive snapshot of all financial activity for that day, including opening/closing balances and transaction counts.
GET
https://api.zenpayz.com/merchant/api/v1/ledger/summary/dailyBearer · 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 |
|---|---|---|
date REQUIRED | string- | Date in YYYY-MM-DD format |
currency OPTIONAL | string- | Filter by currency code (e.g., INR, USD) |
Response
Success (200 OK)
{
"success": true,
"data": {
"summaryId": "sum_20240115_mer_xyz789",
"summaryDate": "2024-01-15",
"merchantId": "mer_xyz789",
"currency": "INR",
"openingAvailableBalance": 100000,
"closingAvailableBalance": 125000,
"openingPendingBalance": 5000,
"closingPendingBalance": 7500,
"openingBlockedBalance": 2000,
"closingBlockedBalance": 3000,
"totalDepositsGross": 35000,
"totalDepositsNet": 33250,
"depositCount": 15,
"totalDepositFees": 1750,
"totalPayouts": 8000,
"payoutCount": 3,
"totalPayoutFees": 250,
"totalRefunds": 1500,
"refundCount": 2,
"totalChargebacks": 500,
"chargebackCount": 1,
"totalSettlements": 0,
"settlementCount": 0,
"totalFeesCollected": 2000,
"totalTransactionCount": 21,
"grossTransactionValue": 45000,
"netMovement": 25000,
"generatedAt": "2024-01-16T00:05:00.000Z",
"isFinalized": true
},
"message": "Daily summary retrieved successfully"
}
Response Fields
| Parameter | Type | Description |
|---|---|---|
summaryId OPTIONAL | string | Unique identifier for the summary |
summaryDate OPTIONAL | string | Date of the summary (YYYY-MM-DD) |
merchantId OPTIONAL | string | Merchant identifier |
currency OPTIONAL | string | Currency code |
openingAvailableBalance OPTIONAL | number | Available balance at start of day |
closingAvailableBalance OPTIONAL | number | Available balance at end of day |
openingPendingBalance OPTIONAL | number | Pending balance at start of day |
closingPendingBalance OPTIONAL | number | Pending balance at end of day |
openingBlockedBalance OPTIONAL | number | Blocked balance at start of day |
closingBlockedBalance OPTIONAL | number | Blocked balance at end of day |
totalDepositsGross OPTIONAL | number | Total deposits before fees |
totalDepositsNet OPTIONAL | number | Total deposits after fees |
depositCount OPTIONAL | number | Number of deposit transactions |
totalDepositFees OPTIONAL | number | Total fees charged on deposits |
totalPayouts OPTIONAL | number | Total payout amount |
payoutCount OPTIONAL | number | Number of payout transactions |
totalPayoutFees OPTIONAL | number | Total fees charged on payouts |
totalRefunds OPTIONAL | number | Total refund amount |
refundCount OPTIONAL | number | Number of refund transactions |
totalChargebacks OPTIONAL | number | Total chargeback amount |
chargebackCount OPTIONAL | number | Number of chargeback transactions |
totalSettlements OPTIONAL | number | Total settlement amount |
settlementCount OPTIONAL | number | Number of settlements |
totalFeesCollected OPTIONAL | number | Total fees collected (all types) |
totalTransactionCount OPTIONAL | number | Total number of transactions |
grossTransactionValue OPTIONAL | number | Gross value of all transactions |
netMovement OPTIONAL | number | Net change in merchant balance |
generatedAt OPTIONAL | string | When the summary was generated |
isFinalized OPTIONAL | boolean | Whether the day is closed and summary is final |
Examples
- cURL
- SDK
# Get daily summary for specific date
curl -X GET "https://api.zenpays.com/merchant/api/v1/ledger/summary/daily?date=2024-01-15¤cy=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"
// Get today's summary
const today = new Date().toISOString().split('T')[0];
const summary = await zenpays.ledger.getDailySummary({
date: today,
currency: 'INR'
});
console.log(`Date: ${summary.summaryDate}`);
console.log(`Opening Balance: ${summary.openingAvailableBalance}`);
console.log(`Closing Balance: ${summary.closingAvailableBalance}`);
console.log(`Net Movement: ${summary.netMovement}`);
console.log(`Total Transactions: ${summary.totalTransactionCount}`);
console.log(`Finalized: ${summary.isFinalized}`);
// Calculate daily metrics
const depositSuccessRate = summary.depositCount > 0
? (summary.totalDepositsNet / summary.totalDepositsGross * 100).toFixed(2)
: 0;
console.log(`Effective deposit rate: ${depositSuccessRate}%`);
// Get yesterday's summary for comparison
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
const yesterdaySummary = await zenpays.ledger.getDailySummary({
date: yesterday.toISOString().split('T')[0],
currency: 'INR'
});
const growthRate = ((summary.totalDepositsGross - yesterdaySummary.totalDepositsGross) /
yesterdaySummary.totalDepositsGross * 100).toFixed(2);
console.log(`Day-over-day deposit growth: ${growthRate}%`);