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

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

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.

@Override
public void onPaymentRelatedDetailsResponse(PayuResponse payuResponse) {
mPayuResponse = payuResponse;
// Check if UPI as payment option available.
 if(payuResponse.isUpiAvailable()){
 // To check if UPI as payment option is available
 }
 if(payuResponse.isGoogleTezAvailable()){
 // To check if Google Pay as payment option is available
 }
  if(payuResponse.isPhonePeIntentAvailable()){
 // To check if Phonepe as payment option is available
 }
  if(payuResponse.isLazyPayAvailable()){
 // To check if LazyPay as payment option is available
 }
  if(payuResponse.isGenericIntentAvailable()){
 // To check if Generic Intent as payment option is available
 }
 //For SI Payments
 if(payuResponse.isNBAvailableFoSI){
 //Fetch SI NB List from payuResponse.getSiBankList() method
 }
}

Last updated