Statement Inquiry API - CLW

The Statement Inquiry API allows you to retrieve wallet transaction details, including both financial and non-financial transactions, within a specific date range. This is useful for generating account statements and transaction history.

Environment

EnvironmentURL
Testhttps://apitest.payu.in/loyalty-points/v1/wallet/statement-inquiry
Productionhttps://api.payu.in/loyalty-points/v1/wallet/statement-inquiry

HTTP Method: POST

Request Headers

This API uses HMAC-SHA512 authentication on the header.

Parameter Description
walletIdentifier
mandatory
String Program Type (e.g., CLW)
date
mandatory
String GMT formatted date (e.g., Thu, 17 Feb 2022 08:17:59 GMT)
Authorization
mandatory
String HMAC-SHA512-based authentication token
Content-Type
mandatory
String application/json
↩️

If you do not post the authentication, you will get error in response. For the list of error codes, refer to Status Codes

hmac authentication logic

hmac username="smsplus", algorithm="sha512", headers="date", signature="7ff938849aa79265a3de63fe241dfecb1c680f58c6d11e9f9ca08512afea374705eb9f8995ef6c4584e16eca2e1dc688262bb0937a36cc0f75ec22a9eea33523"

Where, the fields in this example are:

  • username: The merchant key of the merchant.
  • algorithm: This must have the value as hmac-sha512 that is used for this API.
  • headers: This must have the value as date digest.
  • signature: This must contain the hmacsha512 of (signing_string, merchant_secret), where:
  • signing_string: It must be in the "date: {dateValue}"format. Here, the dateValue is the same values in the fields listed in this table For example, "date: Thu, 17 Feb 2022 08:17:59 GMT"
  • merchant_secret: The merchant Salt of the merchant. For more information on getting the merchant Salt, refer to Generate Merchant Key and Salt.

Request Parameters

{`
Parameter Description Example
messageCode mandatory Numeric (4) - API Code to uniquely identify 'statement Inquiry' API 1072
clientTxnId mandatory String (100) - Unique Id generated by the calling application for each transaction. This ID should always unique in all API Requests. 20150701235959xhstiesqfdscheck
responseDateTime mandatory Numeric (14) - Local Date and time stamp when the transaction originated from the client in YYYYMMDDHHMMSS with time in 24 hr format 20161031214559
customerId conditional String (20) - Customer Id, which uniquely identifies the walletholder in the client system IN2016201611
fromDate mandatory String (10) - Statement Details from Date(DD/MM/YYYY) 10/10/2015
toDate mandatory String (10) - Statement Details to Date(DD/MM/YYYY) 07/08/2016
urn mandatory Numeric (10) - URN of the wallet 1000058915
pageNumber optional Numeric (5) - page number indexed from 1 1
Count optional Numeric (5) - max count should be 100 50
fromRowId optional String (100) - to counter change in the search set, key to identify the last record for the previous set 20161061214556
`}

Response Parameters

ParameterDescriptionExample
responseCodeResponse status code00
messageCodeAPI response code1073
clientTxnIdEchoes the request's clientTxnIdStatementReq2023
urnWallet reference number7000123456
availableBalanceCurrent balance in the wallet10000
openingBalanceWallet balance at the beginning of the specified period5000
closingBalanceWallet balance at the end of the specified period15000
statementDetailsArray of transaction details within the date range. For the field descriptions in this object, refer to[ statementDetails object fields description](#statementDetails object-fields-description).[...]
responseMessageResponse messageSUCCESS

statementDetails object fields description

ParameterDescriptionExample
transactionIdUnique transaction identifierTXN123456789
transactionDateDate of transaction (DD/MM/YYYY)15/07/2023
transactionTimeTime of transaction (HH:MM:SS)14:30:25
transactionTypeType of transaction (CREDIT/DEBIT)CREDIT
transactionAmountTransaction amount in implied decimals5000
availableBalanceBalance after this transaction10000
merchantNameName of merchant or sourceAmazon
descriptionTransaction descriptionCashback reward
statusTransaction statusSUCCESS
referenceNumberReference number for the transactionREF789012345

Sample Request

curl --location --request POST 'https://apitest.payu.in/loyalty- points/v1/wallet/statement-inquiry' \
--header 'walletIdentifier: CLW' \
--header 'authorization: hmac username="smsplus", algorithm="sha512", headers="date", signature="v15rnvh1InSEWRq6EW9BCfXlxO0QI/4Sxxmdxd2f4Q0="' \
--header 'date: Wed, 12 Jun 2024 08:53:43 GMT' \
--header 'Content-Type: application/json' \
--header 'Cookie: PHPSESSID=s4uujktf7gm484pt7uk7bdhv55' \
--data-raw '{ 
 		 "messageCode": "1072",
 "requestDateTime": "20191009030456",
"clientTxnId": "statementinqtes21", 
"fromDate": "01/01/2024",
"toDate": "19/03/2024", "last4Digits": "3877",
"urn": 1000000,
"customerId": "22019",
"count": "100"
}'

Sample Response

{
  "urn": 1000020,
  "customerId": "220555",
  "responseCode": "00",
  "messageCode": 1073,
  "clientTxnId": "statementinqtes22",
  "clientId": "7310",
  "responseDateTime": "20240522120617",
  "responseMessage": "SUCCESS",
  "bankId": 6060,
  "availableBalance": "100000",
  "availableCashLimit": "0",
  "pageNumber": 1,
  "count": 100,
  "openingBalance": "0",
  "closingBalance": "0",
  "statementDetails": [
    {
      "transactionId": "TXN123456789",
      "transactionDate": "15/07/2023",
      "transactionTime": "14:30:25",
      "transactionType": "CREDIT",
      "transactionAmount": 5000,
      "availableBalance": 10000,
      "merchantName": "Amazon",
      "description": "Cashback reward",
      "status": "SUCCESS",
      "referenceNumber": "REF789012345"
    }
  ]
}

Ask AI Beta

Hi! I am an AI Assistant. Ask me about PayU and get help with your integration.
Responses are generated by AI, may contain some mistakes.

EXAMPLE QUESTIONS