Ledger API

Download data of all your transactions for a given date

Zaakpay provides functionality to fetch and download detailed transaction data category wise in bulk for a particular date through API with pagination and authorisation.

Authorisation has to be done using API key which can be generate via Merchant Dashboard.

Ledger API

Purpose: This API is used to fetch transaction details which were performed on a particular date with authorisation and pagination.

Request URL: {HOST}/api/v1/ledger

Environment details:

Staging Server: https://zaakstaging.zaakpay.com
Live Server: https://api.zaakpay.com

Request Type: POST
Endpoint: /api/v1/ledger

Request Header

This key will be used to authorise the API request , merchant can generate API KEY from Zaakpay Dashboard.

Header Name





Request Attributes

Fields DataType Mandatory Description
startDateTime LocalDateTime Y Start date time in “yyyy-MM-dd HH:mm” format
endDateTime LocalDateTime Y End date time in “yyyy-MM-dd HH:mm” format
status String Y Status of transactions requested. Possible Values SUCCESS, FAILED, PENDING,ALL.
pageNumber Integer N Page number of paginated records (Default: 1)
pageSize Integer N Number of records in a page (Default: 1000, Max: 10000)

Response Attributes

Fields Description
txnInitiatedDate Date on which Transaction was initiated in yyyy-MM-dd HH:mm:ss format.
txnLastUpdatedDate Date on which Transaction was Last updated in yyyy-MM-dd HH:mm:ss format.
txnSuccessDate Date on which Transaction was successful in yyyy-MM-dd HH:mm:ss format.
status Status of transaction i.e Success or Failure.
state Zaakpay internal state code of transaction ID.
stateDescription Zaakpay internal state code description.
responseCode It is a max 3 digits Zaakpay’s Response code.
responseDescription It is a description of Zaakpay’s Response code. E.g. Description of Response code 100 is “The transaction was completed successfully”.
orderid Unique transaction identifier for merchant.
txnid Zaakpay internal unique transaction ID.
amount Transaction amount in Rupees.
brand Brand or card network eg: MASTERCARD.
cardType Type of Card used for transactioneg: DEBIT/CREDIT.
buyerName As received with the request.
buyerEmail As received with the request.
bankName Issuing Bank name.
cardNumber Encrypted Card Number which is used in transaction.
paymentSource Source from where transaction done like Net Banking, Debit Card, Credit Card.
refundDetail Refund Details object with refundReferenceNumber, createdAt and amount.

Sample Request

This is the sample API request for reference.

curl -X POST \
  https://zaakstaging.zaakpay.com/api/v1/ledger \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -H 'postman-token: 0ca59eed-315a-db29-d00c-0583b2c9165e' \
  -H 'x-api-key: 55ffc9b8e0c340dba097223ba38c5a87' \
  -d '{
"startDateTime":"2021-12-15 00:00",
"endDateTime":"2021-12-15 14:55",

Sample Response

This is a API's sample Success and Failure response for reference.

            "txnInitiatedDate":"2020-09-19 11:53:32",
            "txnLastUpdatedDate":"2020-09-19 11:53:56",
            "txnSuccessDate":"2020-09-19 11:53:56",
            "responseDescription":"The transaction was completed successfully. ",
            "buyerName":"Test buyer",
            "buyerEmail":"[email protected]",
            "paymentSource":"Net Banking",
            "txnInitiatedDate":"2020-07-17 14:56:05",
            "txnLastUpdatedDate":"2020-07-17 15:40:36",
            "txnSuccessDate":"2020-07-17 14:56:25",
            "stateDescription":"Partial Refund Initiated",
            "responseDescription":"The transaction was completed successfully. ",
            "brand":"AMERICAN EXPRESS",
            "buyerEmail":"[email protected]",
            "bankName":"AMERICAN EXPRESS",
                  "createdAt":"2020-07-17 14:57:26",
                  "createdAt":"2020-07-17 15:40:44",
            "txnInitiatedDate":"2021-06-01 13:17:33",
            "txnLastUpdatedDate":"2021-06-01 13:29:39",
            "responseDescription":"Unfortunately the transaction has failed.Please try again. Transaction has failed",
            "buyerEmail":"[email protected]",
            "txnInitiatedDate":"2021-06-01 13:42:02",
            "txnLastUpdatedDate":"2021-06-01 13:44:00",
            "buyerEmail":"[email protected]",
      "text":"PageSize exceeds the limit 10000"
      "text":"Something went wrong"

Ledger API: Error Codes

These are the Ledger API Error codes. For more info, Please download the Documentation Directly from here.

Error Code Error Description
100 API key value can not be empty.
112 X-API-KEY not correct.
1026 Start or End date fields not present in request.
1027 Status is not present in request or is invalid.
1028 Invalid date time format.
1029 Invalid pageSize or pageNumber.
1030 PageSize exceeds the limit 10000.
1031 Start date time cannot be less than end date time.
1032 Start date cannot be older than 6 months.
1033 End date cannot be greater than current date.
1034 Duration between start and end date time should be less than limit 24 hrs.
1035 No record found.
1036 Something went wrong.



  1. If page number is not provided in the request parameter then by default page number will be 1.
  2. If page size is not provided in the request parameter then by default page size will be 10.
  3. Maximum page size allowed is 500.
  4. Date format - YYYY-MM-dd

Did this page help you?