Customization

The Native OTP Assist SDK provides several customization options allowing you to make the SDK closer to the look & feel of your app and work as per your business requirements.

Following customizations are allowed:

  • Update merchant Logo.

  • Change the theme colour.

  • Change waiting time for the OTP.

  • Disable Auto submit OTP Flag

  • Update merchant response timeout for fallback.

You can display your brand logo in the PayU Native OTP Assist SDK to reinforce trust and branding. To set a logo in the SDK, you need to pass the drawable id of the logo image resource from your app.

Java
Kotlin
Java
PayUOtpAssistConfig payUOtpAssistConfig = new PayUOtpAssistConfig();
payUOtpAssistConfig.setMerchantLogo(R.drawable.merchant_logo);
Kotlin
val payUOtpAssistConfig = PayUOtpAssistConfig()
payUOtpAssistConfig.merchantLogo = R.drawable.merchant_logo

Theme Colour

Our SDK allows you to change the theme colour, you just need to set this primary colour in your color file.

<color name="otp_assist_primary_color">#fd416d</color>

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.

Waiting For OTP
Java
Kotlin
Java
PayUOtpAssistConfig payUOtpAssistConfig = new PayUOtpAssistConfig();
payUOtpAssistConfig.setWaitingTime(45000);
Kotlin
val payUOtpAssistConfig = PayUOtpAssistConfig()
payUOtpAssistConfig.waitingTime = 45000

Auto-Submit OTP Flag

Merchant can enable/disable the auto-submit OTP flow on using the flag below. The default value is set to true.

Java
Kotlin
Java
PayUOtpAssistConfig payUOtpAssistConfig = new PayUOtpAssistConfig();
payUOtpAssistConfig.setShouldAllowAutoSubmit(true);
Kotlin
val payUOtpAssistConfig = PayUOtpAssistConfig ()
payUOtpAssistConfig.shouldAllowAutoSubmit = false

Merchant Response Timeout

This is the duration 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.

Java
Kotlin
Java
PayUOtpAssistConfig payUOtpAssistConfig = new PayUOtpAssistConfig();
payUOtpAssistConfig.setMerchantResponseTimeout(25000);
// for 25 seconds timeout
Kotlin
val payUOtpAssistConfig = PayUOtpAssistConfig()
payUOtpAssistConfig.merchantResponseTimeout = 25000 // for 25 seconds timeout

Disable/Enable Vibration after Successful transaction

After the payment gets successful, the user mobile vibrates for 0.5Sec. You just need to Add the VIBRATE permission in your Manifest file.

Vibrate Permission

<uses-permission android:name="android.permission.VIBRATE"/>

You can disable the vibration behaviour from PayUOtpAssistConfig also.

Java
Kotlin
Java
PayUOtpAssistConfig payUOtpAssistConfig = new PayUOtpAssistConfig();
payUOtpAssistConfig.setShouldVibrateAfterPaymentSuccess(false);
Kotlin
val payUOtpAssistConfig = PayUOtpAssistConfig()
payUOtpAssistConfig.shouldVibrateAfterPaymentSuccess = false

Card Bin Eligibility Check

You can check the card whether your card bin eligible or not for the OTP on the Merchan App or not.

Please refer this document for the eligibility call.