Ledger
Double-entry bookkeeping ledger — track every financial movement with full audit trail.
Methods
getOverview
- JavaScript
- Python
const overview = await zenpays.ledger.getOverview({ currency: 'INR' })
overview = zenpays.ledger.get_overview({"currency": "INR"})
listEntries
- JavaScript
- Python
const { data, total, hasMore } = await zenpays.ledger.listEntries({
account: 'merchant_balance',
from: '2024-01-01',
to: '2024-12-31',
page: 1,
limit: 50,
})
result = zenpays.ledger.list_entries({
"account": "merchant_balance",
"from": "2024-01-01",
"to": "2024-12-31",
"page": 1,
"limit": 50,
})
getBalances
const balances = await zenpays.ledger.getBalances({ currency: 'INR' })
// Returns: { available, pending, reserve, total } per account
getAccounts
const accounts = await zenpays.ledger.getAccounts({ type: 'asset', status: 'active' })
getReserves
const reserves = await zenpays.ledger.getReserves({ type: 'rolling', currency: 'INR' })
getDailySummary
const summaries = await zenpays.ledger.getDailySummary({
startDate: '2024-01-01',
endDate: '2024-01-31',
currency: 'INR',
})
getSummaries
const summaries = await zenpays.ledger.getSummaries({ period: 'monthly', currency: 'INR' })
getReconciliation
const reconciliation = await zenpays.ledger.getReconciliation({
startDate: '2024-01-01',
endDate: '2024-01-31',
})