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:

// 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)

Make Payment

For NetBanking

‌To Pay using NetBanking, you need to pass payment params along with below additional params

Java
Kotlin
Java
mPaymentParams.setBeneficiaryAccountNumber("123456789");
mPaymentParams.setBankCode("AXNBTPV");
Kotlin
mPaymentParams.beneficiaryAccountNumber = "123456789"
mPaymentParams.bankCode = "AXNBTPV"

‌After setting the above parameters, you can get the payment post params using below

Java
Kotlin
Java
try {
mPostData = new PaymentPostParams(mPaymentParams, PayuConstants.NB).getPaymentPostParams();
} catch (Exception e) {
e.printStackTrace();
}‌
Kotlin
try {
mPostData = PaymentPostParams(mPaymentParams, PayuConstants.NB).paymentPostParams
} catch (Exception e) {
e.printStackTrace();
}‌

For UPI

‌To Pay using UPI, you need to pass beneficiaryAccountNumber param as below

Java
Kotlin
Java
// For single account number
mPaymentParams.setBeneficiaryAccountNumber("123456789");
// For multiple account numbers
mPaymentParams.setBeneficiaryAccountNumber("123456789|23456782|1234567");
Kotlin
// For single account number
mPaymentParams.beneficiaryAccountNumber = "123456789"
// For multiple account numbers
mPaymentParams.beneficiaryAccountNumber = "123456789|23456782|1234567"

After setting the above parameters, you can get the payment post params using below

Java
Kotlin
Java
‌ try {
mPostData = new PaymentPostParams(mPaymentParams, PayuConstants.UPI).getPaymentPostParams();
} catch (Exception e) {
e.printStackTrace();
}‌
Kotlin
try {
mPostData = PaymentPostParams(mPaymentParams, PayuConstants.UPI).paymentPostParams
} catch (Exception e) {
e.printStackTrace();
}‌