Advantages
Advantages
- 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.
Prerequisites
Prerequisites
-
Contact our integrations team to get your app, and GitHub account whitelisted to get access to the
https://github.com/upi-turbo/ios-sample-app- sample app repository.- In this repository, you will find the framework files (libraries for Turbo) and the sample app source code to help you with the integration.
- Use branch
custom_ui/turbo_uito access the sample app and frameworks for Turbo UPI. The sample app workspace is divided into Prod, UAT and Mock environment targets with separate pod dependencies.
- Integrate with the Razorpay iOS Custom SDK.
-
Add the below line of code to your the
Podfile, to install Turbo pods:
- Import the Turbo plugins as given below:
1. Integration Steps
Follow these steps to integrate with Turbo UPI with UI.2. Test Integration
Razorpay has three environments: Mock, UAT and Prod. We recommend the following:- Complete the integration with the Mock environment.
- Complete developer testing using Test Data to cover all the Test Case
- Perform the UAT using the Razorpay-provided API keys.
2.1 Test Data
Use the following data to test the integration.Bank List
Bank List
Bank Accounts
Bank Accounts
2.2 Test Case Coverage
Following are the various scenarios based on the dependencies.Dependencies and Scenarios
Dependencies and Scenarios
2.3 How to Test?
Given are the various test cases and their sequential steps.3.1 Device Binding Success
3.1 Device Binding Success
- Enter a mobile number which exists in the user’s device.
- Call
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will be displayed.
- Select Send SMS and send the SMS when prompted on the screen.
- A screen with a list of banks will appear for bank selection.
3.2 SIM not found
3.2 SIM not found
- Remove all SIM cards from the device.
- Enter a mobile number which exists in the user’s device.
- Call
razorpay.upiTurboUI.linkNewUpiAccountmethod. - Expect the
completionHandlerfunction to be triggered with an error indicating SIM not founderror!=null.
3.3 Account Found
3.3 Account Found
- Enter a mobile number which exists in the user’s device.
- Call
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will appear.
- Select Send SMS and send the SMS when prompted on the screen.
- A screen with a list of banks will be displayed for bank selection.
- Select either Axis Bank or SBI Bank, as mentioned in the Test Data.
- A screen with a list of bank accounts will appear for bank account selection.
3.4 PIN
3.4 PIN
PIN set
PIN set
- Enter a mobile number which exists in the user’s device.
- Call
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will appear.
- Select Send SMS and send the SMS when prompted on the screen.
- A screen with a list of banks will be displayed for bank selection.
- Select SBI Bank, as mentioned in the Test Data.
- A screen with a list of bank accounts will appear for bank account selection.
- Select the account ending with xxxx0203, as mentioned in the Test Data.
- Expect the
completionHandlerfunction to be triggered with no errorserror==nullandupiAccounts != null. The newly linked account will be the first object in the list.
PIN not set
PIN not set
- Enter a mobile number which exists in the user’s device.
- Call
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will appear.
- Select Send SMS and send the SMS when prompted on the screen.
- A screen with a list of banks will be displayed for bank selection.
- Select SBI Bank, as mentioned in the Test Data.
- A screen with a list of bank accounts will appear for bank account selection.
- Select an account ending with xxxx0001, as mentioned in the Test Data.
- A screen to enter card details will be displayed for this final step, allowing you to set your UPI PIN.
No Account for Specified Number
No Account for Specified Number
- Enter a mobile number which exists in the user’s device.
- Call the
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will appear.
- Select Send SMS and send the SMS when prompted on the screen.
- A screen with a list of banks will be displayed for bank selection.
- Select HDFC Bank, as mentioned in the Test Data.
- An empty screen for the list of bank accounts will be displayed.
PIN set Successfully
PIN set Successfully
- Enter a mobile number which exists in the user’s device.
- Call
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will appear.
- Select Send SMS and send the SMS when prompted on the screen.
- A screen with a list of banks will be displayed for bank selection.
- Select Axis Bank, as mentioned in the Test Data.
- A screen with a list of bank accounts will appear for bank account selection.
- Select the account ending with xxxx0001, as mentioned in the Test Data.
- A screen to enter card details will be displayed to set your UPI PIN.
- Enter card details as mentioned in the Test Data and select Next.
- Submit the OTP as mentioned in the Test Data and the new PIN on the Mock NPCI screen.
- Expect the
completionHandlerfunction to be triggered with no errorserror==nullandupiAccounts != null. The newly linked account will be the first object in the list.
PIN Changed Successfully
PIN Changed Successfully
- Call the
razorpay.upiTurboUI.manageUpiAccountmethod. - A screen with a list of UPI accounts and their options will be displayed.
- Select Change PIN on any UPI account.
- Submit the old and new PIN on the Mock NPCI screen.
- An alert will be displayed confirming your PIN change was successful.
Invalid PIN or PIN not Matching
Invalid PIN or PIN not Matching
- Call the
razorpay.upiTurboUI.manageUpiAccountmethod. - A screen with a list of UPI accounts and their options will be displayed.
- Select Change Pin on any UPI account.
- Submit an incorrect old and new PIN on the Mock NPCI screen.
- An alert will be displayed, indicating that the provided PIN was invalid or did not match the expected PIN.
Incorrect OTP
Incorrect OTP
- Enter a mobile number which exists in the user’s device.
- Call the
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will appear.
- Select Send SMS and send the SMS when prompted on the screen.
- A screen with a list of banks will be displayed for bank selection.
- Select Axis Bank, as mentioned in the Test Data.
- A screen with a list of bank accounts will appear for bank account selection.
- Select the account ending with xxxx0001, as mentioned in the Test Data.
- A screen to enter card details will be displayed to set your UPI PIN.
- Enter card details as mentioned in the Test Data and select Next.
- Submit any random incorrect OTP except for 123456 as mentioned in the Test Data and the new PIN on the Mock NPCI screen.
- Expect the
completionHandlerfunction to be triggered with an errorerror!=null.
Incorrect Card Details (Reset PIN)
Incorrect Card Details (Reset PIN)
- Call the
razorpay.upiTurboUI.resetUpiPinmethod. - A screen to enter card details will be displayed to set your UPI PIN.
- Enter incorrect card details that are not mentioned in the Test Data and select Next.
- Submit the OTP as mentioned in the Test Data and the new PIN on the Mock NPCI screen.
- An alert will be displayed, indicating that the reset attempt has failed due to incorrect card details.
3.5 UPI ID
3.5 UPI ID
UPI ID Present (Roaming Profile)
UPI ID Present (Roaming Profile)
- Enter a mobile number which exists in the user’s device.
- Call the
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will appear.
- Select Send SMS and send the SMS when prompted on the screen.
- Expect the
completionHandlerfunction to be triggered with no errorserror==nullandupiAccounts != null.
New UPI ID Creation(PIN already set)
New UPI ID Creation(PIN already set)
- Enter a mobile number which exists in the user’s device.
- Call the
razorpay.upiTurboUI.linkNewUpiAccountmethod. - A screen with the Send SMS button will appear.
- Select Send SMS and send the SMS when prompted on the screen.
- A screen with a list of banks will be displayed for bank selection.
- Select SBI Bank, as mentioned in the Test Data.
- A screen with a list of bank accounts will appear for bank account selection.
- Select the account ending with xxxx0203, as mentioned in the Test Data.
- Expect the
completionHandlerfunction to be triggered with no errorserror==nullandupiAccounts != null. The newly linked account will be the first object in the list.
3.6 Transactions
3.6 Transactions
Payments Successful
Payments Successful
- Begin by following the integration steps, specifically the
submitmethod. - Enter an amount that is lower than the account balance.
- Enter the correct PIN, on the Mock NPCI screen.
- Subsequently, you will receive a callback on
onPaymentSuccess. This indicates that the payment has been successfully processed.
Invalid PIN
Invalid PIN
- Begin by following the integration steps, specifically the
submitmethod. - Enter an amount lower than the account balance mentioned in Test Data.
- Enter the incorrect PIN, on the Mock NPCI screen.
- Subsequently, you will receive a callback on
onPaymentError. This indicates that an error occurred during the payment process due to the invalid PIN.
Timeout
Timeout
- Begin by following the integration steps, specifically the
submitmethod. - Enter the amount as 24.
- Enter the correct PIN, on the Mock NPCI screen.
- Subsequently, you will receive a callback on
onPaymentError. This indicates that an error occurred during the payment process due to a timeout.
Insufficient Balance
Insufficient Balance
- Begin by following the integration steps, specifically the
submitmethod. - Enter an amount greater than the account balance as mentioned in Test Data.
- Enter the correct PIN, on the Mock NPCI screen.
- Subsequently, you will receive a callback on
onPaymentError. This indicates that an error occurred during the payment process due to insufficient balance.
Show Balance
Show Balance
- Call the
razorpay.upiTurboUI.manageUpiAccountmethod. - A screen with a list of UPI accounts and their options will be displayed.
- Select Check Balance on any UPI account.
- Enter the correct PIN on the Mock NPCI screen.
- The requested balance information will be displayed for the selected UPI account.
Check Balance - Invalid PIN
Check Balance - Invalid PIN
- Call the
razorpay.upiTurboUI.manageUpiAccountmethod. - A screen with a list of UPI accounts and their options will be displayed.
- Select Check Balance on any UPI account.
- Enter an incorrect PIN, on the Mock NPCI screen.
- An alert will be displayed, indicating that the provided PIN was invalid or did not match the expected PIN.
Delink Account - Success
Delink Account - Success
- Call the
razorpay.upiTurboUI.manageUpiAccountmethod. - A screen with a list of UPI accounts and their options will be displayed.
- Select the delete icon on any UPI account.
- An alert will be displayed, confirming that your account has been successfully delinked.
3.7 Prefetch
3.7 Prefetch
3.7.1 First Time Onboarding
3.7.1 First Time Onboarding
Onboarding Success
Onboarding Success
- Enter a mobile number that exists on the user’s device.
- Call
razorpay.upiTurboUI.prefetchAndLinkUpiAccountsWithUImethod. - Grant the necessary permissions for prefetching and linking the account.
- The device binding process will then commence, which includes sending an SMS for verification.
- After successful device binding, a screen titled Fetching Accounts will be displayed, indicating that the system is retrieving bank account details.
- You will receive a callback
onResponsecontaining two lists: accounts with PINs set and accounts without PINs set, helping you identify which accounts require further actions. - Once an account is linked, you will receive another callback
onResponseasynchronously with updated lists of accounts. This callback indicates that the accounts are now fully linked and updated in the system.
Denied Prefetch Consent
Denied Prefetch Consent
- Enter a mobile number that exists on the user’s device.
- Begin the onboarding process by calling the
razorpay.upiTurboUI.prefetchAndLinkUpiAccountsWithUImethod. - Deny the permissions for prefetching and linking when prompted.
- Despite denying permissions, the device binding process will initiate, including the sending of an SMS for verification.
- After successful device binding, a screen will appear displaying a list of banks available for selection. This step allows you to proceed with selecting a bank even after the initial permission denial.
PIN Set
PIN Set
- Initiate the UPI PIN setup by calling the
razorpay.upiTurboUI.setUpiPinWithUImethod. - A screen requesting card details will be displayed. Enter the necessary information from the Test Data provided.
- After submitting the card details, you will be prompted to enter an OTP. Use the OTP from the Test Data to proceed.
- Next, you will be directed to a screen to enter and confirm your new UPI PIN. Make sure the PIN entered matches the confirmation PIN to ensure successful setup.
3.7.2 Accounts Already Onboarded
3.7.2 Accounts Already Onboarded
- Call the
razorpay.upiTurboUI.prefetchAndLinkUpiAccountsWithUImethod. This action initiates the process for users who have previously completed the onboarding process. - After the method is called, a screen displaying a list of banks will be shown. This list allows the selection of a new or different bank for which the user wants to link an additional account.
- Select the bank for which you want to link the account.