Integrate with Turbo UPI

Steps to integrate Razorpay Turbo UPI with your app.


With Razorpay Turbo UPI, businesses experience faster and simpler payments. It condenses the payment process from 5 steps to just 1, eliminating app redirections. Enjoy a seamless in-app payment experience, reduce dependencies on third-party UPI apps, and gain complete visibility of the payment journey.

You can seamlessly integrate Turbo UPI with Razorpay Android Standard SDK. Explore the full potential of

and know How it Works.

Turbo UPI Standard Checkout Flow

Prerequisites

Before you start integrating Turbo UPI with Razorpay Android Standard SDK, ensure that you follow these guidelines for a smooth integration process:

  1. SDK Version Compatibility:

  2. Import the following frameworks:

    • Razorpay Turbo Wrapper Plugin SDK (Maven)
    • Razorpay Turbo Core SDK
    • Razorpay Turbo UI SDK (Maven)
    • Razorpay SecureComponent SDK
    • Bank SDK
  3. Gradle Properties:

    • Add the following lines to your Android project's gradle.properties file:
      • android.enableJetifier=true
      • android.useAndroidX=true
  4. Minimum SDK Version:

    • Keep in check that the minSDKversion for using Turbo UPI is currently 19 and cannot be overwritten.
  5. Contact Prefill in Standard Checkout:

    • Standard Checkout should load with the contact prefilled. This contact information is crucial for setting up UPI accounts.
    • Make sure your Checkout options include .

Ensure your customers

to get started.

Follow these steps to integrate with Razorpay Turbo UPI:

  1. Initialise the Checkout object with the activity parameter to enable Turbo UPI functionality.

    Checkout checkout = new Checkout()
    .upiTurbo(activity)//mandatory
    .setColor("/*color*/ #000000" );//optional
  2. Use the following code to link the newly created UPI account with your app. This function can be called from any application section, offering multiple entry points for customers to link their UPI account with your app. Linking it in advance allows customers to pay directly with the linked UpiAccount without repeating the linking process.

    checkout.upiTurbo.linkNewUpiAccount("<customerMobile>", "#000000"/*color - in hex format*/,
    new GeneralPluginCallback(){
    @Override
    public void onSuccess(UpiAccount upiAccount){
    }
    @Override
    public void onError(JSONObject error){
    }
    });

Payment Flow

Razorpay SDK will handle all the changes related to UpiTurbo internally. To integrate with the payment flow,

.

Razorpay provides a single exposed function that allows you to manage linked UPI accounts and access all non-transactional flows seamlessly.

View the non-transactional flow

Manage UPI Accounts

The SDK manages the linked UpiAccounts on the application by triggering manageUpiAccounts(), which follows the following internal non-transaction flows for UpiAccounts:

  • Fetch balance: Check the customer's account balance.
  • Change UPI PIN: Provide the customer the ability to change their UPI PIN.
  • Reset UPI PIN: Let your customers reset the PIN for their account.
  • Delete the account from the application: Let your customers delink, that is, remove a selected UPI account from your application.
if (checkout.upiTurbo != null) {
checkout.upiTurbo.manageUpiAccounts("9000090000","#000000"/*color - in hex format(nullable)*/, new GenericPluginCallback() {
@Override
public void onSuccess(@NonNull Object data) {
/* can be safely ignored */
}
@Override
public void onError(@NonNull JSONObject error) {
/* Throws error if Turbo UPI cannot be initialized or throws error */
}
});
}

The SDKs given below provide access to exposed models for seamless integration.

Error

ErrorDescription
errorCodeTypes of error codes
  • BAD_REQUEST_ERROR: Failure from the client's end (SDK).
  • GATEWAY_ERROR: Failure either from the Secure Component or the Bank.
  • SERVER_ERROR: Failure at PSP.
errorDescriptionBrief description of the error.
errorReasonSpecifies the specific reason for the error.
errorSourceIndicates the origin of the error.
errorStepHighlights the stage where the error occurred.

[This is the latest version of the list and was last updated on February 27th, 2024]


Is this integration guide useful?