TPV Integration
For TPV transactions, you need to have different Merchant ID. Please contact your Key Account Manager at PayU for the same.

You can integrate TPV with Core SDK in below steps:

Hash Calculation

‌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:

1
// For single account number
2
beneficiarydetail = "{'beneficiaryAccountNumber':'123456789'}"
3
4
// For multiple account number
5
beneficiarydetail = "{'beneficiaryAccountNumber':'123456789|54321234|98765673|34767988'}"
6
7
// Hash calculation
8
Hash = sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||beneficiarydetail|SALT)
Copied!
It is recommended to pass ifscCode for NB, UPI and TEZ TPV transactions. Hash calculation will include ifscCode as shown below
1
// For single ifsc code
2
beneficiarydetail = "{'beneficiaryAccountNumber':'917732227242','ifscCode':'SBIN000700'}"
3
4
// For multiple ifsc number
5
beneficiarydetail = "{'beneficiaryAccountNumber':'917732227242|72522762|283228235','ifscCode':'SBIN000700|KTKN2937492|ICIC0002522'}"
6
7
// Hash calculation
8
Hash = sha512(key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||beneficiarydetail|SALT)
Copied!

Make Payment

For NetBanking

‌To Pay using NetBanking, you need to pass payment params along with below additional params
Java
Kotlin
1
mPaymentParams.setBeneficiaryAccountNumber("123456789");
2
mPaymentParams.setIfscCode("SBIN000700");
3
mPaymentParams.setBankCode("AXNBTPV");
Copied!
1
mPaymentParams.beneficiaryAccountNumber = "123456789"
2
mPaymentParams.ifscCode = "SBIN000700"
3
mPaymentParams.bankCode = "AXNBTPV"
Copied!
‌After setting the above parameters, you can get the payment post params using below
Java
Kotlin
1
try {
2
mPostData = new PaymentPostParams(mPaymentParams, PayuConstants.NB).getPaymentPostParams();
3
} catch (Exception e) {
4
e.printStackTrace();
5
}
Copied!
1
try {
2
mPostData = PaymentPostParams(mPaymentParams, PayuConstants.NB).paymentPostParams
3
} catch (Exception e) {
4
e.printStackTrace();
5
}
Copied!

For UPI

‌To Pay using UPI, you need to pass beneficiaryAccountNumber param as below
Java
Kotlin
1
// For single account number
2
mPaymentParams.setBeneficiaryAccountNumber("123456789");
3
mPaymentParams.setIfscCode("SBIN000700");
4
5
// For multiple account numbers
6
mPaymentParams.setBeneficiaryAccountNumber("123456789|23456782|1234567");
7
mPaymentParams.setIfscCode("SBIN000700|KTKN2937492|ICIC0002522");
8
Copied!
1
// For single account number
2
mPaymentParams.beneficiaryAccountNumber = "123456789"
3
mPaymentParams.ifscCode = "SBIN000700"
4
5
// For multiple account numbers
6
mPaymentParams.beneficiaryAccountNumber = "123456789|23456782|1234567"
7
mPaymentParams.ifscCode = "SBIN000700|KTKN2937492|ICIC0002522"
8
Copied!

For UPI Collect

After setting the above parameters for UPI Collect transaction, you can get the payment post params using below
Java
Kotlin
1
try {
2
mPostData = new PaymentPostParams(mPaymentParams, PayuConstants.UPI).getPaymentPostParams();
3
} catch (Exception e) {
4
e.printStackTrace();
5
}
Copied!
1
try {
2
mPostData = PaymentPostParams(mPaymentParams, PayuConstants.UPI).paymentPostParams
3
} catch (Exception e) {
4
e.printStackTrace();
5
}
Copied!

For TEZ

For TEZ transaction, you can get the payment post params using below
Java
Kotlin
1
try {
2
mPostData = new PaymentPostParams(mPaymentParams, PayuConstants.TEZ).getPaymentPostParams();
3
} catch (Exception e) {
4
e.printStackTrace();
5
}
Copied!
1
try {
2
mPostData = PaymentPostParams(mPaymentParams, PayuConstants.TEZ).paymentPostParams
3
} catch (Exception e) {
4
e.printStackTrace();
5
}
Copied!
Last modified 4mo ago