Authentication with PayU APIs

The PayU India API requires authentication using a merchant key and a salt. When you post requests using any of the PayU APIs, you will be posting the merchant key as the first parameter, so separate authentication is not required because these are REST APIs All requests are accompanied by a hash that is appended at the end of the request. While posting parameters for an API, the hash parameter in each API must contain the hash value to be calculated at your end. For example, the string used for calculating the hash is mentioned below:

sha512 (key|command|var1|salt)

Here, sha512 is the encryption method used. For more information on SHA, refer to Wikipedia 1.

To perform reverse hashing, you can use the Hash API of the PayU node SDK on Github. Refer to the PayU node SDK Readme, download and install the PayU node SDK from the PayU node SDK Github location 1.

📘

Reference

For hashing or reverse hashing, refer to Generate Hash