Hash Generation
(Mandatory Step)
Last updated
(Mandatory Step)
Last updated
The CheckoutPro SDK uses hashes to ensure security of the transaction and preventing any unauthorized intrusion or modification. The CheckoutPro SDK requires two types of hashes:
Static Hashes (Mandatory) – These hashes can be passed to SDK during integration and do not change between transactions.
Dynamic Hashes (Mandatory) – These hashes must be generated at runtime for each transaction and will vary based on the transaction parameters.
Below are the list of static hashes:
After setting the values in above formula generate sha512 over it and pass the same in additional param.
Payment hash is calculated with below formula for SI transaction
For example
For free trial transactions, free trial value should be used in hash calculation as below
For example
For passing dynamic hashes, merchant will receive a call on the method generateHash of PayUCheckoutProListener.
In the method parameter, you will receive a dictionary or hashMap, extract the value of hashString from that. Pass that value to server, now server will append salt at the end and generate sha512 hash over it. Server will give that hash back to your app and app will give that hash to us via callback mechanism.
There is no need to know the formula for dynamic hashes because our SDK itself gives you the string containing all the required parameter. Your server just has to append salt at the end and generate sha512 hash over it.
Below are the list of dynamic hashes:
Hash Name
Description
HashFormula
payment_related_
details_for_mobile_sdk
It is used to fetch enabled payment options. If not passed, checkout screen will not appear.
<key>|payment_related_details_for_mobile_sdk|<userCredential>|<salt>
eligibleBinsForEMI
It is used to fetch the eligible bins for EMI when EMI is enabled. If not passed, EMI payment will not work.
<key>|eligibleBinsForEMI|default|<salt>
getEmiAmount
AccordingToInterest
It is used to fetch EMI details like, amount, interest rate, etc when EMI is enabled. If not passed, EMI payment will not work.
<key>|vas_for_mobile_sdk|<amount>|<salt>
delete_user_card (Deprecated)
It is used to delete the saved card of user. If not passed, delete save card functionality will not work.
<key>|delete_user_card|<userCredential>|<salt>
payment
It is used for making payment. If not passed, payment will not happen.
<key>|<txnid>|<amount>|<productinfo>|<firstname>|<email>|<udf1>|<udf2>|<udf3>|<udf4>|<udf5>||||||<salt>
delete_payment_instrument
It is used to delete the Tokenised card
<key>|delete_payment_instrument|<userCredential>|<salt>
get_payment_instrument
It is used to get all stored tokenised cards
<key>|get_payment_instrument|<userCredential>|<salt>
get_payment_details
It is used to get the payment details of an existing card stored on PayU Vault so that you can use it with third-party tokenisation
<key>|get_payment_details|<userCredential>|<salt>
Hash Name
Description
getBinInfo
It is used to fetch Bin details. If not passed, card payments will not happen.
get_eligible_payment
_options
It is used when verifying Phone number in OlaMoney Section. If not passed, phone number will not be verified and hence user will not be able to proceed.
validateVPA
It is used for validating VPA on UPI Collect screen. If not passed, VPA will not be verified and hence user will not be able to proceed.
get_checkout_details
It is used to get detail of additional charges, down status, tax info, offer
lookup api hash
It is used to fetch the Multi Currency Conversion details. This is used in MCP Integration.
Note: Only for this Hash you need to calculate Hmac SHA1 instead of SHA512
checkBalanceApiHash
It is used to get sodexocard detail.