You can add UPI to your existing integration. The following instructions show only what you must add to your integration specifically for UPI.
If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.
The additions you must make depends on the server-side flow that your integration uses:
Start integrating with Sessions flow Component
Choose your versionRequirements
Requirement | Description | |
---|---|---|
Integration type | Make sure that you have an existing Sessions flow iOS Components integration. | |
Checkout API | Make sure that you use Checkout API v68 or later. | |
Setup steps | Before you begin, add UPI in your Customer Area. |
Add additional parameters to your /sessions request
You do not need to add any parameters when you create a payment session.
Initialize the Component for UPI
To initialize UPI, use the UPIComponent
class.
let paymentMethods = session.sessionContext.paymentMethods // Check that the payment method is supported before showing the Component. guard let paymentMethod = paymentMethods.paymentMethod(ofType: InstantPaymentMethod.self) else { return } let component = UPIComponent(paymentMethod: paymentMethod, context: context, // Set the configuration object that you created for UPI. configuration: ) self.currentComponent = component // Set the session as the delegate. component.delegate = session present(component)
Test and go live
Depending on your account setup, you may have access to the UPI simulator which you can use to test your UPI integration. Contact your Account Manager or our Support Team if you have questions about the simulator.
You can also use your personal account on a UPI app to test your integration by making live payments with a low value.