Getting Enabled Payment Options
This page describes how to get all payment options enabled on your merchant key along with additional informations like stored cards, payment option details.

Call GetPaymentRelatedDetailsTask

1
GetPaymentRelatedDetailsTask paymentRelatedDetailsForMobileSdkTask = new GetPaymentRelatedDetailsTask(this);
2
//where ,
3
//Input param (this) is the instance of class which implements PaymentRelatedDetailsListener
4
//‘PaymentRelatedDetailsListener’ is interface with abstract method, which is
5
//public void onPaymentRelatedDetailsResponse(PayuResponse payuResponse)
Copied!

GetPaymentRelatedDetails Response

Once you call ‘execute’, the GetPaymentRelatedDetailsTask, ‘onPaymentRelated Details Response’ callback is called.Check for the available methods to see if selected payment option is available.
1
@Override
2
public void onPaymentRelatedDetailsResponse(PayuResponse payuResponse) {
3
mPayuResponse = payuResponse;
4
// Check if UPI as payment option available.
5
if(payuResponse.isUpiAvailable()){
6
// To check if UPI as payment option is available
7
}
8
if(payuResponse.isGoogleTezAvailable()){
9
// To check if Google Pay as payment option is available
10
}
11
if(payuResponse.isPhonePeIntentAvailable()){
12
// To check if Phonepe as payment option is available
13
}
14
if(payuResponse.isLazyPayAvailable()){
15
// To check if LazyPay as payment option is available
16
}
17
if(payuResponse.isGenericIntentAvailable()){
18
// To check if Generic Intent as payment option is available
19
}
20
//For SI Payments
21
if(payuResponse.isNBAvailableFoSI){
22
//Fetch SI NB List from payuResponse.getSiBankList() method
23
}
24
}
Copied!
Last modified 8mo ago