VOOZH about

URL: https://www.geeksforgeeks.org/kotlin/upi-payment-integration-in-android-using-jetpack-compose/

⇱ UPI Payment Integration in Android using Jetpack Compose - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

UPI Payment Integration in Android using Jetpack Compose

Last Updated : 23 Jul, 2025

If you are selling any product or providing any service in your android application, then you should have integrated a feature in your android application where you can allow users to make payments through your application. In this article, we will take a look at the implementation of payment gateway integration in Android.

In this article, we will be using the Easy UPI Payment gateway library for adding this feature to our android application using Jetpack Compose

Steps to Implement UPI Payment Integration

Step 1: Create a New Project in Android Studio

To create a new project in Android Studio please refer to How to Create/Start a New Project in Android Studio. While choosing the template, select Empty Compose Activity. If you do not find this template, try upgrading the Android Studio to the latest version.

Step 2: Adding dependency in build.gradle.kts file

Navigate to app > Gradle Scripts > build.gradle.kts file and add the below dependency in the dependencies section. 

dependencies {
...
implementation ("dev.shreyaspatil.EasyUpiPayment:EasyUpiPayment:3.0.3")
}

After adding this dependency simply sync your project to install it. 


Step 3: Adding Internet Permissions in AndroidManifest.xml file

Navigate to app > AndroidManifest.xml and add the below code to it. 

<uses-permission android:name="android.permission.INTERNET" />


Step 4: Working with the MainActivity.kt file

Go to the MainActivity.kt file and refer to the following code. Below is the code for the MainActivity.kt file. Comments are added inside the code to understand the code in more detail.

MainActivity.kt:

Output:

Comment
Article Tags:

Explore