For TPV transaction, hash calculation formula is different from normal type of payment:
For multiple account number, account number should be pipe separated and max 4 account numbers are allowed.
Hash Formula:
// For single account number
beneficiarydetail = "{'beneficiaryAccountNumber':'123456789'}"
// For multiple account number
beneficiarydetail = "{'beneficiaryAccountNumber':'123456789|54321234|98765673|34767988'}"
// Hash calculation
Hash = sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||beneficiarydetail|SALT)
It is recommended to pass ifscCode for NB, UPI and TEZ TPV transactions. Hash calculation will include ifscCode as shown below
// For single ifsc code
beneficiarydetail = "{'beneficiaryAccountNumber':'917732227242','ifscCode':'SBIN000700'}"
// For multiple ifsc number
beneficiarydetail = "{'beneficiaryAccountNumber':'917732227242|72522762|283228235','ifscCode':'SBIN000700|KTKN2937492|ICIC0002522'}"
// Hash calculation
Hash = sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||beneficiarydetail|SALT)
Make Payment
For NetBanking
To Pay using NetBanking, you need to pass payment params along with below additional params
To Pay using UPI, you need to pass beneficiaryAccountNumber param as below
// For single account number mPaymentParams.setBeneficiaryAccountNumber("123456789");mPaymentParams.setIfscCode("SBIN000700");// For multiple account numbersmPaymentParams.setBeneficiaryAccountNumber("123456789|23456782|1234567"); mPaymentParams.setIfscCode("SBIN000700|KTKN2937492|ICIC0002522");
// For single account number mPaymentParams.beneficiaryAccountNumber ="123456789"mPaymentParams.ifscCode ="SBIN000700"// For multiple account numbersmPaymentParams.beneficiaryAccountNumber ="123456789|23456782|1234567"mPaymentParams.ifscCode ="SBIN000700|KTKN2937492|ICIC0002522"
For UPI Collect
After setting the above parameters for UPI Collect transaction, you can get the payment post params using below