SDK Integration
  • Getting Started
  • Onboarding Requirements
  • Hash Generation
  • Test Merchant list
  • Android
    • Android SDK Offering
    • PayUCheckoutPro
      • Integration
      • Build the Payment Params
        • Additional Params
      • Hash Generation
      • Set up the payment hashes
      • Initiate the Payment
      • Customized Integration
        • Set Webview Properties
        • SDK Configuration
        • Additional Offerings
      • Offers Integration
      • Convenience Fee Integration
      • Custom Note Integration
      • MCP Integration
    • Core
      • Supported Payment Types
      • TPV Integration
      • Merchant Web Services
        • Getting Enabled Payment Options
        • GetCheckoutDetails API
        • Lookup API
    • Custom Browser
      • Integration
        • CustomBrowser Config
        • CustomBrowserCallback
        • Supporting below Lollipop Versions
        • Third-Party Payments Support
      • Sample App
      • Change Logs
    • Native OTP Assist
      • Integration
      • Customization
      • Change Logs
    • UPI
      • Integration
      • TPV Integration in UPI
      • Sample App
      • Change Logs
    • Google Pay™
      • Integration
      • Sample App
    • PhonePe
      • Integration
      • Sample App
      • Change Logs
    • OlaMoney
    • PayU OTP Parser
      • Integration
    • FAQ Android
  • iOS
    • PayUCheckoutPro
      • Integration
      • Advanced Integration
      • Set up the payment hashes
      • Convenience Fee Integration
      • MCP Integration
      • Custom Note Integration
    • Core
      • POD Integration
      • Seamless
      • Web Services
      • Objective C-Non-Seamless
      • Standing Instructions
      • TPV Integration
      • Sample App
    • Custom Browser
      • Sample App
    • OlaMoney
    • Native OTP Assist
      • Integration
      • Customization
    • UPI
      • Integration
      • Sample App
    • PayUParams
      • PayUSIParams
      • PayUBeneficiaryParams
  • Releasing to Apple
  • React-Native
    • PayUCheckoutPro
      • Integration
      • Set up the payment hashes
      • Advanced Integration
      • Change Logs
    • Core
    • Non-Seamless Wrapper
    • TPV (beta)
      • Integration
  • FAQ iOS
Powered by GitBook
On this page
  • Merchant Name
  • Merchant Logo
  • Hide toolbar in the Custom Browser (CB)
  • Hide Checkout screen back button dialog
  • Hide CB back button dialog
  • Runtime SMS Permission
  • Auto Select OTP
  • Merchant Response Timeout
  • Waiting for OTP timeout
  • Enable Surepay on Bank Page
  • Review Order
  • Additional Payment Options in the Checkout screen
  • Set Checkout Payment modes order
  • Enforce Payment Modes

Was this helpful?

  1. Android
  2. PayUCheckoutPro
  3. Customized Integration

SDK Configuration

To configure the CheckoutPro SDK, you can customize the properties in the PayUCheckoutProConfig and pass the config object in the open method when invoking the SDK like below

PayUCheckoutPro.open( 
    Activity activity, 
    PayUPaymentParams payUPaymentParams, 
    PayUCheckoutProConfig payUCheckoutProConfig, 
    PayUCheckoutProListener payUCheckoutProListener) 
PayUCheckoutPro.open( 
    activity: Activity, 
    payUPaymentParams: PayUPaymentParams, 
    payUCheckoutProConfig: PayUCheckoutProConfig, 
    payUCheckoutProListener: PayUCheckoutProListener) 

Merchant Name

The merchant name is displayed in the SDK indicating the recipient of the payment. Max length is 20 characters. To set your brand name or business name, set the merchantName property of the PayUCheckoutProConfig object as indicated below-

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig(); 
payUCheckoutProConfig.setMerchantName("PayU"); 
val payUCheckoutProConfig = PayUCheckoutProConfig() 
payUCheckoutProConfig.merchantName = "PayU Payments Private Limited" 

Merchant Logo

You can display an image (typically, your brand logo) in the PayUCheckoutPro SDK to reinforce trust and display your brand to your customer. To set a logo in the SDK, you need to pass the drawable id of the logo image resource from your app.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig(); 
payUCheckoutProConfig.setMerchantLogo(R.drawable.merchant_logo); 
val payUCheckoutProConfig = PayUCheckoutProConfig() 
payUCheckoutProConfig.merchantLogo = R.drawable.merchant_logo 

Hide toolbar in the Custom Browser (CB)

Merchant can choose to hide the toolbar on CB. By default,toolbar is displayed.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig (); 
payUCheckoutProConfig.setShowCbToolbar(false); //hide toolbar 
val payUCheckoutProConfig = PayUCheckoutProConfig() 
payUCheckoutProConfig.showCbToolbar = false //hide toolbar 

Hide Checkout screen back button dialog

Merchant can choose to hide dialog that appears when the back button is pressed from the L1 screen. Default value is true.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig (); 
payUCheckoutProConfig.setShowExitConfirmationOnCheckoutScreen(false); //hide back button dialog 
val payUCheckoutProConfig = PayUCheckoutProConfig () 
payUCheckoutProConfig.showExitConfirmationOnCheckoutScreen = false//hide back button dialog 

Hide CB back button dialog

Merchant can choose to hide dialog that appears when back button is pressed in CB. Default value is true.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig(); 
payUCheckoutProConfig.setShowExitConfirmationOnPaymentScreen(false); //hide back button dialog 
val payUCheckoutProConfig = PayUCheckoutProConfig () 
payUCheckoutProConfig.showExitConfirmationOnPaymentScreen= false //hide back button dialog 

Runtime SMS Permission

Merchant can set this flag to false if doesn’t want Checkout Pro SDK to ask for runtime SMS permission on bank otp page. Default value is true.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig(); 
payUCheckoutProConfig.setMerchantSmsPermission(false);  
val payUCheckoutProConfig = PayUCheckoutProConfig() 
payUCheckoutProConfig.merchantSmsPermission= false 

Auto Select OTP

Merchant can choose to auto select OTP flow on bank page with below flag. Default value is false.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig(); 
payUCheckoutProConfig.setAutoApprove(true);  
val payUCheckoutProConfig = PayUCheckoutProConfig () 
payUCheckoutProConfig.autoSelectOtp = true 

Merchant Response Timeout

This is time PayU will wait for merchant surl/furl to load before passing the transaction response back to the app. If merchant surl/furl pages take longer to load then by default PayU has a response timeout of 10 sec. However, if merchants feel that their Surl/Furl can take longer than 10 seconds then they can set this flag.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig(); 
payUCheckoutProConfig.setMerchantResponseTimeout(15000); // for 15 seconds timeout 
val payUCheckoutProConfig = PayUCheckoutProConfig() 
payUCheckoutProConfig.merchantResponseTimeout = 15000 // for 15 seconds timeout 

Waiting for OTP timeout

We wait for a specifed time for the OTP after which the SDK falls back to the manual OTP screen. The default time is 30s; you may change it to any other duration. We recommend keeping it less than 60s for better user experience.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig(); 
payUCheckoutProConfig.setWaitingTime(45000); 
PayUCheckoutProConfig payUCheckoutProConfig = PayUCheckoutProConfig()  
payUCheckoutProConfig.waitingTime = 45000

Enable Surepay on Bank Page

Merchant can enable surepay on the bank page. When the internet is lost during the transaction, if the transaction can be retry from that bank page after the internet is resumed, surepay dialog is displayed. It has legitimate values as 0,1,2 and 3. Where number defines the number of times surepay dialog should be displayed during the transaction for no internet connectivity. The Default value is 0.

PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig(); 
payUCheckoutProConfig.setSurePayCount(3); 
val payUCheckoutProConfig = PayUCheckoutProConfig () 
payUCheckoutProConfig.surePayCount = 3 

Review Order

Merchant can pass the checkout order details to the SDK that will be displayed in the SDK during the transaction flow.

ArrayList<OrderDetails> orderDetailsList = new ArrayList<>(); 
orderDetailsList.add(new OrderDetails("Milk","1")); 
orderDetailsList.add(new OrderDetails("Butter","1")); 
PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig (); 
payUCheckoutProConfig.setCartDetails(orderDetailsList); 
val orderDetailsList = ArrayList<OrderDetails>() 
orderDetailsList.add(OrderDetails(“Milk”,”1”)) 
orderDetailsList.add(OrderDetails(“Butter”,”1”)) 
val payUCheckoutProConfig = PayUCheckoutProConfig () 
payUCheckoutProConfig.cartDetails = orderDetailsList 

Additional Payment Options in the Checkout screen

Consider the below example to display Google Pay, PhonePe, and Paytm on the primary checkout screen.

ArrayList<PaymentMode> checkoutOrderList = new ArrayList<>(); 
checkoutOrderList.add(new PaymentMode(PaymentType.UPI, PayUCheckoutProConstants.CP_GOOGLE_PAY)); 
checkoutOrderList.add(new PaymentMode(PaymentType.WALLET, PayUCheckoutProConstants.CP_PHONEPE)); 
checkoutOrderList.add(new PaymentMode(PaymentType.WALLET, PayUCheckoutProConstants.CP_PAYTM)); 
PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig (); 
payUCheckoutProConfig.setPaymentModesOrder(checkoutOrderList);
val checkoutOrderList = ArrayList<PaymentMode>() 
checkoutOrderList.add(PaymentMode(PaymentType.UPI, PayUCheckoutProConstants.CP_GOOGLE_PAY)) 
checkoutOrderList.add(PaymentMode(PaymentType.WALLET, PayUCheckoutProConstants.CP_PHONEPE)) 
checkoutOrderList.add(PaymentMode(PaymentType.WALLET, PayUCheckoutProConstants.CP_PAYTM)) 
val payUCheckoutProConfig = PayUCheckoutProConfig () 
payUCheckoutProConfig.paymentModesOrder = checkoutOrderList 

Set Checkout Payment modes order

Default payment modes order on checkout screen is as below: Card, NetBanking, UPI and Wallets

Merchant can specify the checkout payment options order. For this, the merchant needs to provide a list of payment modes. Checkout order will be the order of items in the list. If not all payment modes order is mentioned in the list the other payment modes will be displayed in their default order as shown above.

ArrayList<PaymentMode> checkoutOrderList = new ArrayList<>(); 
checkoutOrderList.add(new PaymentMode(PaymentType.CARD)); 
checkoutOrderList.add(new PaymentMode(PaymentType.UPI)); 
PayUCheckoutProConfig payUCheckoutProConfig = new PayUCheckoutProConfig (); 
payUCheckoutProConfig.setPaymentModesOrder (checkoutOrderList);  
val checkoutOrderList = ArrayList<PaymentMode>() 
checkoutOrderList.add(PaymentMode(PaymentType.CARD)) 
checkoutOrderList.add(PaymentMode(PaymentType.UPI)) 
val payUCheckoutProConfig = PayUCheckoutProConfig () 
payUCheckoutProConfig.paymentModesOrder = checkoutOrderList 

The resulting order on the initial Checkout screen will be

Cards (credit/debit)

UPI

Net Banking

Wallets

Enforce Payment Modes

You can directly open a specific payment mode like NB, WALLET, UPI,CARD, etc in SDK. To do so, create a enforce list as below

 ArrayList<HashMap<String,String>> enforceList = new ArrayList();
 HashMap<String,String> map = new HashMap<>();
 map.put(PayUCheckoutProConstants.CP_PAYMENT_TYPE, PaymentType.NB.name());
 map.put(PayUCheckoutProConstants.ENFORCED_IBIBOCODE, "AXIB");
 enforceList.add(map);

 val enforceList = ArrayList<HashMap<String,String>>()
 enforceList.add(HashMap<String,String>().apply {
           put(PayUCheckoutProConstants.CP_PAYMENT_TYPE,PaymentType.NB.name)
           put(PayUCheckoutProConstants.ENFORCED_IBIBOCODE,"AXIB")
        })

To enforce card type as well like CC or DC, then enforce list should have a HashMap with keys PaymentType and CardType as shown below

ArrayList<HashMap<String,String>> enforceList = new ArrayList();
 HashMap<String,String> map = new HashMap<>();
 map.put(PayUCheckoutProConstants.CP_PAYMENT_TYPE, PaymentType.CARD.name());
 map.put(PayUCheckoutProConstants.CP_CARD_TYPE, CardType.CC.name());
 map.put(PayUCheckoutProConstants.CP_CARD_SCHEME, CardScheme.MAST.name())
 enforceList.add(map);

 val enforceList = ArrayList<HashMap<String,String>>()
 enforceList.add(HashMap<String,String>().apply {
put(PayUCheckoutProConstants.CP_PAYMENT_TYPE,PaymentType.CARD.name)
put(PayUCheckoutProConstants.CP_CARD_TYPE,CardType.CC.name)
put(PayUCheckoutProConstants.CP_CARD_SCHEMA, CardScheme.AMEX.name)
        })

After creating the enforce list, pass it to payuCheckoutProConfig object created above

payUCheckoutProConfig.setEnforcePaymentList(enforceList);

payUCheckoutProConfig.enforcePaymentList = enforceList 
PreviousSet Webview PropertiesNextAdditional Offerings

Last updated 3 years ago

Was this helpful?

Waiting For OTP