TPV Integration in UPI
For details on hash calculation for TPV, refer here

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
2
3
// To provide customer VPA
4
mPaymentParams.setVpa("valid VPA");
5
try {
6
mPostData = new PaymentPostParams(mPaymentParams, PayuConstants.UPI).getPaymentPostParams();
7
} catch (Exception e) {
8
e.printStackTrace();
9
}
Copied!
1
// To provide customer VPA
2
mPaymentParams.vpa = "valid VPA";
3
try {
4
mPostData = PaymentPostParams(mPaymentParams, PayuConstants.UPI).paymentPostParams
5
} catch (Exception e) {
6
e.printStackTrace();
7
}
Copied!

‌For UPI INTENT

After setting the above parameters for UPI INTENT transaction, you can get the payment post params using below
Java
Kotlin
1
try {
2
mPostData = new PaymentPostParams(mPaymentParams, PayuConstants.UPI_INTENT).getPaymentPostParams();
3
} catch (Exception e) {
4
e.printStackTrace();
5
}
Copied!
1
try {
2
mPostData = PaymentPostParams(mPaymentParams, PayuConstants.UPI_INTENT).paymentPostParams
3
} catch (Exception e) {
4
e.printStackTrace();
5
}
Copied!
Last modified 7mo ago
Copy link
Contents
For UPI