Integrate Turbo UPI Mock SDK
Steps to integrate the Razorpay Turbo UPI Mock SDK with your app.
Mock SDK is a tool designed to facilitate your integration with Turbo UPI. Unlike conventional integration methods that rely on the stability of partner banks and NPCI UAT environments, Mock SDK removes this dependency, streamlining the integration process.
- No Dependency on UAT Environment: Traditional integration methods often encounter obstacles due to issues with UAT environments. Mock SDK removes this roadblock, enabling you to integrate without external dependency.
- Streamlines Integration: Mock SDK is designed to create a smoother integration experience, ensuring a hassle-free process. This allows you to quickly offer Turbo UPI services to the users.
- Effortless Integration for Essential Flows: Mock SDK simplifies the process of integrating Turbo for important scenarios. This enables you to expand your range of UPI services for customers without dealing with complex requirements.
- Seamless Transition to Production: After testing your integration with Mock SDK, you can smoothly transition to the Production SDK for final testing. This ensures a seamless and secure transition from development to live production.
-
Contact our
to get your mobile number, app, and GitHub account whitelisted to get access to thehttps://github.com/upi-turbo/android-turbo-sample-app
- sample app repository.- In this repository, you will find the AAR files (libraries for Turbo) and the sample app source code to help you do the entire integration.
- The AARs on the main branch are for the production environment, the ones on the
TURBO-719
branch are for the UAT environment, and themock-product
is for the mock environment.
These are the important files in the sample app repo:
app/libs
: All libraries (Bank, SecureComponent, and Turbo).app/build.gradle
: All transitive dependencies needed to integrate Turbo SDK.
-
Integrate with the
. -
Import the following frameworks:
- Checkout SDK
- Razorpay Turbo Wrapper Plugin SDK (maven)
- Razorpay Turbo Mock Core SDK
- Razorpay Turbo Mock SDK
- Razorpay SecureComponent SDK
- Bank SDK
-
Add the following lines to your Android project's
gradle.properties
file:android.enableJetifier=true
android.useAndroidX=true
Watch Out!
minSDKversion
for using Turbo UPI is currently 19 and cannot be overwritten.- API Key Usage for Different Environments:
- Use the
rzp_test_0wFRWIZnH65uny
API key id for testing on the UAT environment. - Use the
rzp_test_vacN5cmVqNIlhO
API key id for testing on the Mock environment. - Use the for prod testing.
- Use the
- As a compliance requirement, you need to get approval from Google for READ_SMS permission. Refer to the for more details.
Follow these steps to integrate with
.Razorpay has three environments: Mock, UAT and Prod. We recommend the following:
- Complete the integration with the Mock environment.
- Perform the UAT using the Razorpay-provided API keys.
Use the following data to test the integration.
Following are the various scenarios based on the dependencies.
Given are the various test cases and their sequential steps.
In the scenario of successful device binding, follow these simple steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant all the required permissions as prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a list of banks for selection will appear.
In the event of a SIM card not being found, follow these steps:
- Remove all SIM cards from the device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant all the required permissions as prompted.
- A screen will be displayed with the error message No SIM found.
When permissions are denied or access is restricted, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Deny the required permissions when prompted.
- A screen will be displayed, asking to allow the denied permissions.
In the scenario where an account is found, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant the required permissions when prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a list of banks for selection will appear.
- Select Axis Bank or SBI Bank as mentioned in the .
- The expected response should be
UpiTurboLinkAction = SELECT_BANK_ACCOUNT
withaction.getError()==null
(no errors). - The accounts based on the bank selection will be shown.
When it comes to setting or managing your PIN, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant the necessary permissions when prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a list of banks for selection will appear.
- Select Axis Bank or SBI Bank as mentioned in the .
- The accounts based on the bank selection will be shown.
- Select the account ending with xxxx0203, as mentioned in the .
- The account will be linked, and the PIN will be set successfully.
When dealing with scenarios where a PIN is not set, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant the necessary permissions when prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a list of banks for selection will appear.
- Select Axis Bank or SBI Bank as mentioned in the .
- The accounts based on the bank selection will be shown.
- Select an account ending with xxxx0001, as mentioned in the .
- A card details screen will be displayed.
When there is no account associated with a particular number, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant the necessary permissions when prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a list of banks for selection will appear.
- Select HDFC or Yes Bank as mentioned in the .
- A screen will appear with the error message No bank account found.
For a successful PIN setup, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant the necessary permissions when prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a list of banks for selection will appear.
- Select Axis Bank or SBI Bank as mentioned in the .
- The accounts based on the bank selection will be shown.
- Select an account ending with xxxx0001, as mentioned in the .
- A card details screen will be displayed. Enter the details from .
- Enter bank OTP from on the next screen then proceed.
- Enter and confirm the PIN on the subsequent screens.
In situations where an incorrect OTP is encountered, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant the necessary permissions when prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a list of banks for selection will appear.
- Select Axis Bank or SBI Bank as mentioned in the .
- The accounts based on the bank selection will be shown.
- Select an account ending with xxxx0001, as mentioned in the .
- A card details screen will be displayed. Enter the details form
- Enter any random OTP except for 123456.
When dealing with resetting your PIN with incorrect card details, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant the necessary permissions when prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a list of banks for selection will appear.
- Select Axis Bank or SBI Bank as mentioned in the .
- The accounts based on the bank selection will be shown.
- Select an account ending with xxxx0001, as mentioned in the .
- Enter incorrect card details.
For the scenario of creating a new UPI ID with an already set PIN, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call the
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant all the required permissions as prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a screen with a list of Banks will be displayed for Bank selection.
- Select Axis Bank or SBI Bank as mentioned in the .
- The accounts based on bank selection will be shown.
- Select an account ending with xxxx0203, as mentioned in the .
- Expect the final response to confirm that an account with a UPI ID is linked successfully.
For the scenario of creating a new UPI ID without a set PIN, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call the
razorpay.upiTurbo.linkNewUpiAccountWithUI
method. - Grant all the required permissions as prompted.
- The device binding process will initiate, including SMS sending.
- After successful device binding, a screen with a list of Banks will be displayed for Bank selection.
- Select Axis Bank or SBI Bank as mentioned in the .
- The accounts based on bank selection will be shown.
- Select an account ending with xxxx0001, as mentioned in the .
- A card detail screen will be displayed. Enter the details from .
- Enter the bank OTP from on the next screen, then proceed.
- Enter and confirm the PIN on the subsequent screens.
For scenarios related to checking your balance, follow these steps:
- Enter a mobile number that is already registered on the device.
- Call
razorpay.upiTurbo.manageUpiAccounts
method. - A list of linked accounts will be displayed.
- Select the account for which you want to check the balance.
- Click on Check Balance, then enter the correct PIN when prompted.
- The balance for the selected account will be displayed.
When it comes to scenarios focused on checking your balance, follow these steps:
- Enter a mobile number that exists on the user's device.
- Call the
razorpay.upiTurbo.manageUpiAccounts
method. - A list of linked accounts will be displayed.
- Select the account for which you want to check the balance.
- Click on Check Balance.
- Enter an incorrect PIN when prompted.
- An error message will be displayed indicating that the provided PIN is invalid or does not match the expected PIN.
When it comes to scenarios related to delinking your account, follow these steps:
- Enter a mobile number that is already registered on the device.
- Call
razorpay.upiTurbo.manageUpiAccounts
method. - A list of linked accounts will be displayed.
- Select the account you wish to delink.
- Click on the option to delink or remove the account.
- A confirmation alert will be displayed, confirming that your account has been successfully delinked.
When it comes to successfully changing your PIN, follow these steps:
- Enter a mobile number that is registered on the device.
- Call
razorpay.upiTurbo.manageUpiAccounts
method. - A list of linked accounts will be presented.
- Select the specific account for which you intend to change the PIN.
- Click on Change PIN, and proceed to enter the current PIN, along with the new PIN, and confirm the new PIN on the subsequent screens.
When attempting to change your PIN but encountering a failure, follow these steps:
- Enter a mobile number that is registered on the device.
- Call
razorpay.upiTurbo.manageUpiAccounts
method. - A list of linked accounts will be displayed.
- Select the specific account for which you wish to change the PIN.
- Click on Change PIN and proceed to enter an incorrect PIN, or enter a new PIN and a different PIN while confirming it.
To successfully reset your PIN, proceed with the following steps:
- Enter a mobile number that is registered on the device.
- Call the
razorpay.upiTurbo.manageUpiAccounts
method. - View the list of linked accounts.
- Select the specific account for which you wish to reset the PIN.
- Click on Reset PIN and follow the prompts to input the bank OTP from the .
- Enter the new PIN and confirm it on the subsequent screens.
Watch Out!
- Device Binding will only work if the user has at least one SIM card in their mobile device.
- Users can set/reset the UPI PIN. The configured PIN will be used to validate the transaction.
- Based on the for bank accounts, choose a bank for a single, multiple or no bank account.
- Use the same ATM PIN and card Number mentioned in the .
- The UPI PIN will revert to its default setting or be removed when you uninstall or clear storage.
- Amount ₹24 is blocked for special cases. Please refer to .
Businesses should have the capability to display a user-friendly message to their customers for certain special or additional error scenarios. The SDK is equipped to simulate some of these cases.
- Only one TPV whitelisted account (ending with xxxx0203) is permitted. Payments made using any other accounts will fail with the error Payment failed because the account linked to VPA is invalid.
- Payment can be made multiple times when using Mock for any given
order_id
, which is not the case in production. - Use the
rzp_test_V5AtnjYvupQXm1
API key id for TPV testing on the Mock environment.
Complete this
to take your integration live.Is this integration guide useful?