Checksum Calculation
For both integrity & data-authenticity verification before sending data to the API, you need to calculate a checksum of all the data that you send to Zaakpay Payment Gateway. We use HMACSHA-256 algorithm to calculate the checksum of ALL data that is posted to the API.
For Redirect Flow
To calculate the checksum please follow the process below:
- Create a list of all parameters which you’re passing to the API. String used in checksum calculation has a predefined sequence in which parameters are to be concatenated.
- Create a concatenated string of all data values in your list, with ampersand ' & ' at the end of each item with the parameter name.
Sample checksum string for redirect flow. amount=100&buyerEmail=[email protected]¤cy=INR&merchantIdentifier=b6415a6443604ec59644a70c8b25a0f6&orderId=ZPLive1607485250537&..
The empty parameters are not to be used in the checksum calculation string.
- Calculate the checksum using the HMAC SHA-256 algorithm the concatenated string as data and your generated secret key.
- The resulting checksum calculated should be posted to the Zaakpay Payment Gateway API along with other data.
Want to generate checksum string ?
You can refer the generated checksum string against the provided request parameters here
The secret key , returnUrl and currency was configured for the sandbox environment.
Similarly you can generate the response checksum for a particular transaction to validate the response.
Sample response checksum string.
amount=100&bank=NA&bankid=NA&cardId=NA&cardScheme=NA&cardToken=NA&cardhashid=NA&doRedirect=false&orderId=ZPLive1607485534584&paymentMethod=Not Found&paymentMode=Net Banking&responseCode=100&responseDescription=The transaction was completed successfully. &productDescription=NA&product1Description=NA&product2Description=NA&product3Description=NA&product4Description=NA&pgTransId=ZP5b5ffe4b04f99&pgTransTime=12/09/2020 09:15:55&
Also you can refer the final page after performing a transaction here for response checksum string.
Updated about 3 years ago