iOS UPI Bolt SDK
PayU UPI Bolt SDK will provide a simpler and more efficient payment experience to the merchants. It will eliminate any third-party redirection and higher success rate. Profile management including accounts and balances for users. Enhancing the overall customer experience and decreasing customer drop-offs. This section describes the advantages and user journeys. For steps to integrate UPI Bolt UI, refer to UPI Bolt UI Integration.
UPI Bolt UI advantages
- One-click payment journey and no hassle of redirection to a third-party UPI application.
- Quick completion of transactions because of direct integration with the bank.
- Seamless user experience to the customers with in-app payment.
- Easy to integrate and get the advantage of existing customer profiles created with banks.
- 5-6% higher success rate and better transaction conversion..
- Merchants can take advantage of a complete user funnel to understand user behavior.
UPI Bolt UI user journeys
Registration and Pay
- Merchant Application can do the User registration for customers who are coming first time for PayU UPI Bolt. The Registration can be done during the checkout process or it can be called in a separate user journey. In case of Merchant is using PayU Checkout Pro SDK, PayU will take care of customer registration.
- Once the registration process is initiated, the user will be asked to accept the SMS sending permissions required to verify the SIM card. If the phone has dual SIM, the SIM card selection screen will be shown to customers to select the specific SIM card.
- After the device verification, UPI ID creation and the Bank selection will be done. Add bank journey will be completed after adding a bank account connected to the same mobile number used for device verification.
- Finally, customers can do a transaction using the added bank account. In case the customer is using the bank account for the first time they will need to set the MPIN as well.

Pay
- Customers who are already registered with PayU UPI Bolt can make a One-click payment.
- The customer needs to select the already added bank account and enter the MPIN and the transaction will be completed.
- The customer can also check the balance before making a transaction to avoid low-balance transaction failure.

Profile Management Journey
- Customers can add new bank accounts, set MPIN, change MPIN, reset MPIN, delete accounts, and check the balance of already added bank accounts.
- Transaction history can be seen and queries can be raised and resolved within the PayU UI Bolt SDK.
- Customers can see all the raised disputes from the Dispute history screen.
- Customers can also deregister their all accounts with PayU UI Bolt SDK.

Steps to Integrate
Prerequisites
- SDK Compatibility
- Supported iOS deployment target - iOS 17 and above.
Merchants who want to integrate only PayU UPI Bolt with their app. They can manage the checkout options on their checkout screen. Although they can use PayU UPI Bolt UI SDK for customer registration, payment, and profile management.
To include the PayU UPI Bolt UI SDK in your project, add the following code snippet to your podfile.
pod 'PayUIndia-UPIBoltUIKit', '~> 1.0.0-alpha.0'
The following xcframework files will be provided by PayU during onboarding.
- NPCI - CommonLibrary.xcframework
- AXIS - OlivePayLibrary.xcframework
Add these framework in your project.
The added framework is similar to the following screenshot:

To integrate UPI Bolt UI on iOS SDK platform:
Step 1: Initialization
It is used to initialize the SDK. This method returns a object that will be used to access other methods available in PayUUPIBoltUI
.
let config = PayUUPIBoltUIConfig(
merchantName: "<merchantName>", // String
merchantKey: "<merchantKey>" // String,
phone: "<phone>", // String
email: "<email>", // String
refId: "<refId>", // String
pluginTypes: ["<pluginType>"], // Array<String>
excludedBanksIINs: ["<excludedBanksIIN>"], // Array<String>
isProduction: <isProduction> // Bool
)
// To initialize the SDK
val boltUI = PayUUPIBoltUI.initSDK(
parentVC: <parentVC>, // UIViewController
config: <config>, // PayUUPIBoltUIConfig
delegate: <self> // Reference to delegate
)
// To get the already initialised object
let boltUI = PayUUPIBoltUI.getInstance()
// To clear the SDK Instance
PayUUPIBoltUI.reset()
The following fields are needed as a request for this API:
Fields | Description |
---|---|
parentVC
|
|
delegate
|
|
config
|
|
merchantName
|
|
merchantKey
|
|
phone
|
|
email
|
|
pluginTypes
|
|
isProduction
|
|
excludedBanksIINs
|
|
refId
|
|
Step 2: Check if UPI Bolt SDK is available
The isUPIBoltSDKAvailable API allows you to manage UPI accounts and transaction history.
boltUI.isUPIBoltSDKAvailable(callback: PayUUPIBoltUICallBack)
For callbacks, refer to Listener or Callback logic.
The following fields are needed as a request for this API:
Fields | Definition |
---|---|
callback
|
|
Step 3: Register and pay
The registerAndPay API allows you to initialize registration and payment flow. It will internally authenticate and register the customer. After successful authentication and registration, the user will follow the payment journey. Once payment is completed, based on the payment status the merchant will get a callback through the listener.
boltUI.registerAndPay(paymentParams PayUUPIBoltPaymentParams)
For paymentParams, pass PayUUPIBoltPaymentParams
instance. For more information, refer to Generate PayU Payment Params.
The following fields are needed as a request for this API:
Fields | Definition |
---|---|
paymentParams
|
|
Step 4: Open UPI Management
The openUPIManagement API allows you to manage UPI accounts and transaction history.
boltUI.openUPIManagement(screenType: PayUUPIBoltUIScreenType) // Screen Types enum PayUUPIBoltUIScreenType: Int { case all case transactionHistory case manageUPIAccounts case dispute case deregisterUPI }\`
For callbacks, refer to Listener or Callback logic.
The following fields are needed as a request for this API:
Fields | Definition |
---|---|
screenType
|
|
Step 5: Generate PayU payment params
The PayUPaymentParams API is used to generate PayU payment parameters.
var paymentParams = PayUUPIBoltPaymentParams(
txnId: "<transactionId>", // Replace with actual transaction ID
amount: "<amount>", // Replace with actual amount
productInfo: "<productInfo>", // Replace with actual product info
firstName: "<firstName>", // Replace with actual first name
surl: "<surl>", // Replace with actual success URL
furl: "<furl>" // Replace with actual failure URL
)
paymentParams.additionalParam = ["key": "value"] // Optional to pass any additional information
let udfs = PayUUPIBoltUserDefines()
udfs.udf1 = "<udf1>" // Replace with actual value or nil
udfs.udf2 = "<udf2>" // Replace with actual value or nil
udfs.udf3 = "<udf3>" // Replace with actual value or nil
udfs.udf4 = "<udf4>" // Replace with actual value or nil
udfs.udf5 = "<udf5>" // Replace with actual value or nil
udfs.udf6 = "<udf6>" // Replace with actual value or nil
paymentParams.udfs = udfs // Optional User defined fields
The following fields are needed as a request:
Fields | Definition |
---|---|
amount
|
|
txnId
|
|
productInfo
|
|
firstName
|
|
furl
|
|
surl
|
|
udf1
|
|
udf2
|
|
udf3
|
|
udf4
|
|
udf5
|
|
Step 6: Check PayU UPI Response
The PayUUPIResponse API is used to check the response.
Fields | Definition |
---|---|
code | Integer Error or success code |
message | String Error or success message |
result | Object Response data |
Hash generation logic
The PayU SDKs use hashes to ensure the security of the transaction and prevent any unauthorized intrusion or modification.
To generate and pass dynamic hashes, the merchant will receive a call from the generateHash
method of PayUUPIBoltUIDelegate. The SDK calls the generateHash
method each time it needs an individual hash.
func generateHash(for param: [String: String],
onCompletion: @escaping PayUUPIBoltHashGenerationCompletion) {
// Your implementation here
}
The merchant receives a dictionary containing the type of hash and the corresponding hash string as its values. The merchant needs to sign the provided hash string using their salt to create the final hash and pass it back via the completion handler. param: This dictionary contains two keys:
- hashName - The name of the command.
- hashString - The hash string, without the salt. PayUUPIBoltHashGenerationCompletion: This completion handler contains the hashDict parameter.
- hashDict: Provide a dictionary where the hashName is the key, and the generated hash is the value. To generate the hash, you need to combine the hashString with the salt on your server and apply the SHA-512 algorithm and pass it back via the completion handler
Listener or Callback logic
The listener/callback contains 4 methods where the merchant app will get the API response and hash-related callbacks.
Method | Purpose |
---|---|
func onPayUSuccess(response: PayUUPIBoltResponse) | It will contain success response. |
func onPayUFailure(response: PayUUPIBoltResponse) | It will contain failure response |
onPayUCancel(isTxnInitiated: Bool) | It will tell if payment was cancelled |
func generateHash(for param: [String: String], onCompletion: @escaping PayUUPIBoltHashGenerationCompletion): | For hash generation, refer to Hash generation logic. |
Error codes and error message list
Codes | Message |
---|---|
0 | Success |
1 | Fail/ Invalid Response/ Missing params |
2 | User canceled the transaction |
100 | Transaction timeout |
101 | Hash missing |
102 | Incorrect Hash |
103 | Handshake failed |
104 | UPI bolt not supported |
105 | Device not supported for UPI Bolt |
106 | Permission missing |
107 | Sim info not available |
108 | Device binding failed |
500 | Something went wrong |
501 | No internet connection |
Updated 2 days ago