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:
- Staging Server: https://zaakstaging.zaakpay.com / http://zaakpay-stagapi1.mbkinternal.in
- Live Server: https://api.zaakpay.com
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” |
refundDetail.merchantRefId | String | N | Unique refund transaction id sent by merchant in Refund API |
checksum | String | Y | Checksum Calculated on all above request parameters. |
Response Attributes
These are the Response Attributes of Zaakpay Check Status API.
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"},"refundDetail":{"merchantRefId":"123456"}}
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"},"refundDetail":{"merchantRefId":"123456"}}' \
--data-urlencode 'checksum=e0a8a4080fc661dbd23119309d9a45817bd01cc9264b1fde9b26a1dac7e1da50'
Sample Response
The Response will be in JSON Format.
{
"success": true,
"merchantIdentifier": "b19e8f103bce406cbd3476431b6b7973",
"orders": [
{
"orderDetail": {
"orderId": "ZPLive1602500556069",
"txnId": "ZP5b1773d1f776b",
"amount": "200",
"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",
"refundDetails":[
{
"amount": "100",
"arn": "1234567"
}
],
"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.
Updated 9 months ago