Check Transaction Status API

API to check status of any transaction

Zaakpay provides functionality to track transaction. Any time Merchant can check the the latest status of transaction through API.

Check Status API

Purpose: The API is used to check the latest status of the transaction at any time.

Environment details:

Request Type: POST
Endpoint: /checkTxn?v=5

Request Attributes

These are the Request Attributes of Zaakpay Check Status API.

Fields DataType Mandatory Description
merchant Identifier String Y Zaakpay’s unique alphanumeric merchant identifier. You can get it from Zaakpay dashboard.
orderId String Y It is a unique transaction identifier for which status to checked..
mode String Y 1 digit only. i.e. “0”
checksum String Y Checksum Calculated on all above request parameters.

Response Attributes

These are the Response Attributes of Zaakpay Check Status API.

Fields Description
merchantIdentifier Zaakpay’s unique alphanumeric merchant identifier. You can get it from Zaakpay dashboard.
orderid It is a unique transaction identifier for merchant.
Response code It is a max 3 digits Zaakpay’s Response code.
response description It is a description of Zaakpay’s Response code. E.g. Description of Response code 100 is “The transaction was completed successfully”.
paymentmethod Payment Method ID for Card and Net Banking transactions. For Card txns, payment Method ID starts with C and N for NetBanking.It is an alphanumeric value with max length 6.First letter is C or N, followed by 5 digits max.
cardhashid Unique id for each card number used in transaction. For Net banking txns, value will be “NA”.
amount Transaction amount in paisa.
paymentmode Mode of payment
txnid Zaakpay Transaction ID.
timestamp Time stamp of txn.
productdescription As received with the request.
product1description As received with the request.
product2description As received with the request.
product3description As received with the request.
product4description As received with the request.
txnStatus This is Check API txn Status. For Success, it would be “0”.
checksum Checksum calculated by Zaakpay on all response attributes.

Checksum Calculation

Create a string(JSON) using the request attributes as given below. Checksum string will create based on the request attributes which are posted to Zaakpay as same as given in the string below.

Now, Calculate the checksum using the HMAC SHA-256 algorithm using the string as data and your generated secret key. The resulting checksum calculated should be posted to the Zaakpay API along with other data.

The Checksum string will be:

Secret Key used: 0678056d96914a8583fb518caf42828a

{"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","mode":"0","orderDetail":{"orderId":"ZPLive1602500556069"}}
e0a8a4080fc661dbd23119309d9a45817bd01cc9264b1fde9b26a1dac7e1da50

Sample Request & Response

For reference, below are the sample CURL request and Response of API . It takes all required attributes to hit the Check Status API.

Sample Request

We have create a sample request of Check Status API with all required attributes and their values, in the order in which they’ll be sent to the API.

The resulting checksum calculated should be posted to the Zaakpay API along with other required attributes.

curl --location --request POST 'https://zaakstaging.zaakpay.com/checkTxn?v=5' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: JSESSIONID=A4C211B0FC1F713C69DD79521963AAD2' \
--data-urlencode 'data={"merchantIdentifier":"b19e8f103bce406cbd3476431b6b7973","mode":"0","orderDetail":{"orderId":"ZPLive1602500556069"}}' \
--data-urlencode 'checksum=e0a8a4080fc661dbd23119309d9a45817bd01cc9264b1fde9b26a1dac7e1da50'

Sample Response

The Response will be in JSON Format.

{
    "success": true,
    "merchantIdentifier": "b19e8f103bce406cbd3476431b6b7973",
    "orders": [
        {
            "orderDetail": {
                "orderId": "ZPLive1602500556069",
                "txnId": "ZP5b1773d1f776b",
                "amount": "100",
                "productDescription": "Zaakpay subscription fee",
                "createDate": "2020-10-12 16:32:47",
                "product1Description": "NA",
                "product2Description": "NA",
                "product3Description": "NA",
                "product4Description": "NA"
            },
            "paymentInstrument": {
                "paymentMode": "Credit Card",
                "card": {
                    "cardToken": "4012 XXXX XXXX 1112",
                    "cardId": "25157d8564f730461489ea3102c393fd3bf13cfed94966f44815714d57170f4c~273",
                    "cardScheme": "Visa",
                    "first4": "4012",
                    "last4": "1112",
                    "bank": "HDFC",
                    "cardHashId": "CH373",
                    "paymentMethod": "401200"
                }
            },
            "responseCode": "230",
            "responseDescription": "Transaction Refund Initiated",
            "txnDate": "2020-10-12 16:44:43",
            "txnStatus": "3",
            "userAccountDebited": true
        }
    ],
    "version": "5"
}

Check Status API txn Status

txnStatus Description
0 Success
1 Failure
2 Pending
3 Refund
4 Partial Refund
5 Chargeback Reverted
6 Chargeback
7 Partial Chargeback Reverted
8 Partial Chargeback

Check Status API Response codes

These are the Check Status API response codes.

Response Code Response Description Transaction Success Valid for refund
103 Fraud Detected
110 MerchantIdentifier field missing or blank
111 MerchantIdentifier not valid
129 OrderId field missing or blank
155 Mode field missing or blank
156 Mode received with request was not valid
180 Checksum received with request is not equal to what we calculated
182 Merchant Data not complete in our database
189 Checksum was blank.
190 OrderId either not processed or Rejected.
191 Merchant Identifier or Order Id was not valid
205 We could not find this transaction in our database
206 Transaction in Scheduled state.
207 Transaction in Initiated state.
208 Transaction in Processing state.
209 Transaction has been authorized.
210 Transaction has been put on hold.
211 Transaction is incomplete.
212 Transaction has been settled.
213 Transaction has been canceled.
223 Data Validation success.
228 Transaction has been captured.
230 Transaction Refund Initiated
231 Transaction Refund Completed
232 Transaction Payout Initiated
233 Transaction Payout Completed
234 Transaction Payout Error.
236 Transaction Refund Paid Out
237 Transaction Chargeback has been initiated
238 Transaction Chargeback is being processed
239 Transaction Chargeback has been accepted
240 Transaction Chargeback has been reverted
241 Transaction Chargeback revert is now complete
245 Transaction Partial Refund Initiated
246 Transaction Partial Chargeback has been initiated
247 Transaction Partial Chargeback is being processed
248 Transaction Partial Chargeback has been accepted
249 Transaction Partial Chargeback has been reverted
251 Transaction Partial Refund Paid out
252 Transaction Partial Refund Completed
253 Transaction Refund Before Payout Paid out
254 Transaction Partial Refund Before Payout Paid Out
255 Transaction Partial Refund Before Payout Completed
256 Transaction Refund Before Payout Completed
400 Your Bank has declined this transaction, please Retry this payment with another Card.

Did this page help you?