Ola Money Developer Hub

Welcome to the Ola Money developer hub. You'll find comprehensive guides and documentation to help you start working with Ola Money as quickly as possible, as well as support if you get stuck.

Documentation

Understanding Hash

Why is hash important?

The hash computed this way, has to match with the hash posted in JSON.
If there is a mismatch, following could be the reasons.

  • You are using a wrong/test access key or secret key
  • Data may have been tampered with

If you don't do a hash matching at your end, you are vulnerable to a potential hacking attempt.

Computing Hash

You need to generate a hash, in the following format, using SHA-512
Note: All param are mandatory and amount should be in two decimal point.

All parameters are mandatory and amount should be in 2 places of decimal point

Note: All param are mandatory and amount should be in two decimal point.

hash = sha512('access_token|uniqueId|comments|udf|returnUrl|notifyUrl|currency|amount|couponCode|salt');

Why do we use SHA-512?

Of all the Hash functions available, the SHA-2 family is currently among the strongest, and the best choice considering commonness, analysis, and security.

import hashlib
hash_object = hashlib.sha512(b'ola_access_token|TXN1232434343555523|optional|optional|http://myweb.com/myreturn_url.php|http://myweb.com/mynotify_url.php|INR|100.00|OMOFFER|ola_salt')
ola_hash = hash_object.hexdigest()
<?php
$ola_hash = openssl_digest('ola_access_token|TXN1232434343555523|optional|optional|http://myweb.com/myreturn_url.php|http://myweb.com/mynotify_url.php|INR|100.00|OMOFFER|ola_salt', 'sha512');
?>

You can also look at our github repo

Understanding Hash