## Steps to Integrate PG SDKLess UPI Open Intent Flow (ANDROID)

  1. Get the list of UPI Apps installed on the user’s device using the below code snippet.


  1. Add the below line to your AndroidManifest.xml file **Note**: If you declare a <package> element in your app's manifest file, then the app associated with that package name appears in the results of any query to PackageManager that matches a component from that app.


  1. Display the custom UI containing the list of UPI apps obtained from Step 1. on the checkout page under the UPI section.

Make Sure packageName is accessible when the user selects any of the UPI Applications.

314

  1. When the user selects any of the UPI apps to initiate the payment, then you must pass the following parameters in the [PAY API](🔗) request payload based on the app selected by the user and the device platform.

  • deviceContext.deviceOS - Possible Values: **ANDROID**, **IOS**

  • paymentInstrument.type - "**UPI_INTENT**"

  • paymentInstrument.target app - The package name of the UPI app selected by the user to initiate the payment. Example: PhonePe App - "**com.phonepe.app**", **Gpay App** - "**com.google.android.apps.nbu.paisa.user**", etc.


  1. After calling the [PAY API](🔗), you will receive the **intentUrl** in response. You have to invoke the app-specific Intent using the received **intentUrl**. Use the below code snippet to invoke app-specific Intent.

Update the **APP_PACKAGE** value with the package name of the UPI app selected by the user on the merchant's checkout page to launch the payment.


  1. After the payment completion, once you get the UI control back to the merchant app, check for the payment status with your backend server. You can rely on a [Server-to-Server](🔗) callback response. If not received, you must call the [Check Status API](🔗).

Override onActivityResult to receive the UI Callback after the payment completion.


  1. Once the payment status is validated against the order, fulfill the order.