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 Cordova Standard SDK. Explore the full potential of

and know how it works.

Turbo UPI Standard Checkout Flow

Prerequisites

  1. Integrate with

    .

  2. Import the following frameworks:

    • Razorpay Cordova Standard SDK
    • Razorpay Turbo Wrapper Plugin SDK (maven)
    • Razorpay Turbo Core SDK
    • Razorpay Turbo UI SDK
    • Razorpay SecureComponent SDK
    • Bank SDK
  3. Enable data binding in your app.gradle.

    {
    "android": {
    // Containing other settings
    "buildFeatures": {
    "dataBinding": true
    }
    }
    }

Ensure your customers

to get started.

Follow these steps to integrate with Razorpay Turbo UPI:

  1. Use the code given below to initialise the SDK.

    RazorpayCheckout.initUpiTurbo("rzp_test_0wFRWIZnH65uny")
  2. Use the following code to link the newly created UPI account with your app. This function can be called from anywhere in the application, providing multiple entry points for customers to link their UPI account with your app.

    Request Parameters

    mobileNumber

    mandatory

    string Mobile number of the customer.

    color

    optional

    string Colour in HEX format.

    Response Parameters

    ParametersDescription
    function(upiAccounts)This function is triggered if the list is fetched successfully. The upiAccounts can be empty to indicate that no accounts have been linked yet.
    function(error)This function is triggered in case of an error, and the error object will be received.
    • Handle payment failure responses, displaying important details such as error codes, error descriptions, and metadata. This function is responsible for handling and logging information in the event of a payment error.
    var cancelCallback = function(error) {
    /**
    * error contains two values:
    * 1. Error Code
    * 2. Error Description
    **/
    // handle failure
    };
    • Handle successful payment responses, displaying key information like order id, payment id, and signature. This code manages and logs details when a payment transaction is successful.
    var successCallback = function(response) {
    /**
    * response contains three values:
    * 1. Order ID
    * 2. Payment ID
    * 3. Signature
    **/
    // handle success
    };
  3. To accept payments, call Standard Checkout’s submit method with the following payload:

    var rzpOptions = {
    amount: 2000,
    currency: "INR",
    prefill: {
    contact: "1234567890",
    email: "gaurav.kumar@example.com"
    },
    theme: {
    color: "#063970"
    },
    send_sms_hash: true,
    retry: {
    enabled: false,
    max_count: 4
    }
    };
    RazorpayCheckout.open(rzpOptions, successCallback, cancelCallback);

    Request Parameter

    payload

    mandatory

    variable Payload for initiating transaction.

    Response Parameters

    ParametersDescription
    successCallbackIt is triggered upon successful completion of the payment, providing access to a response object.
    cancelCallbackIt is invoked in the event of a failure, providing access to an error object.

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(). The sequence of steps is as given below:

  • 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.
RazorpayCheckout.upiTurbo.manageUpiAccounts("mobileNo", "color", function(error) {
// handle error
});

Request Parameters

mobileNumber

mandatory

string Mobile number of the customer.

color

optional

string Colour in HEX format.

Response Parameter

ParametersDescription
function(error)This function is triggered in case of an error, and the error object will be received.

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]

UpiAccount

FieldsReturn TypeDescription
accountNumberStringMasked account number.
ifscStringIFSC of the bank.
bankLogoUrlStringImage URL of the bank logo.
bankNameStringName of the bank.
bankPlaceholderUrlStringImage URL of the bank logo placeholder.

Response

FieldsReturn TypeDescription
paymentIdStringPayment id.
orderIdStringOrder id.
signatureStringSignature of the transaction.

Is this integration guide useful?


integrate cordova sdk
turbo upi
turbo upi sdk integration