Skip to main content

Get Ledger Entries

Retrieve paginated ledger entries (double-entry bookkeeping records) with optional filters.

GEThttps://api.zenpayz.com/merchant/api/v1/ledger/entries
Bearer · API key

Request

Headers

HeaderDescription
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

ParameterTypeDescription
page
OPTIONAL
integer1Page number
limit
OPTIONAL
integer20Items per page (max 100)
startDate
OPTIONAL
string-Filter from date (YYYY-MM-DD)
endDate
OPTIONAL
string-Filter to date (YYYY-MM-DD)
currency
OPTIONAL
string-Filter by currency code
entryType
OPTIONAL
string-Filter by type: DEBIT or CREDIT

Response

Success (200 OK)

{
"success": true,
"data": {
"entries": [
{
"entryId": "le_xxxxx",
"batchId": "batch_xxxxx",
"accountId": "acc_xxxxx",
"merchantId": "mer_xxxxx",
"entryType": "CREDIT",
"entryCategory": "DEPOSIT_NET",
"amount": 950,
"currency": "INR",
"balanceBefore": 9050,
"balanceAfter": 10000,
"sourceType": "PAYMENT",
"sourceTransactionId": "txn_xxxxx",
"sourceOrderId": "order_xxxxx",
"description": "Payment deposit (net after fees)",
"postedAt": "2024-01-15T10:30:00.000Z",
"createdAt": "2024-01-15T10:30:00.000Z"
},
{
"entryId": "le_yyyyy",
"batchId": "batch_xxxxx",
"accountId": "acc_xxxxx",
"merchantId": "mer_xxxxx",
"entryType": "DEBIT",
"entryCategory": "PAYOUT",
"amount": 5000,
"currency": "INR",
"balanceBefore": 15000,
"balanceAfter": 10000,
"sourceType": "PAYOUT",
"sourceTransactionId": "po_xxxxx",
"description": "Payout withdrawal",
"postedAt": "2024-01-15T09:00:00.000Z",
"createdAt": "2024-01-15T09:00:00.000Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8,
"hasNext": true,
"hasPrev": false
},
"total": 150
},
"message": "Ledger entries retrieved successfully"
}

Entry Types

TypeDescription
DEBITDecrease in account balance
CREDITIncrease in account balance

Entry Categories

CategoryDescription
DEPOSIT_GROSSGross deposit amount before fees
DEPOSIT_NETNet deposit amount after fees
DEPOSIT_FEEFee deducted from deposit
PAYOUTPayout withdrawal
PAYOUT_FEEPayout processing fee
REFUNDRefund to customer
CHARGEBACKChargeback deduction
SETTLEMENTSettlement transfer
RESERVE_ALLOCATIONReserve allocation
RESERVE_RELEASEReserve release

Examples

curl -X GET "https://api.zenpays.com/merchant/api/v1/ledger/entries?page=1&limit=20&currency=INR&entryType=CREDIT" \
-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"