Razorpay payment gateway integration in android


In this blog, we are going to learn about Razorpay payment gateway integration in android with SDK approach.

Before starting integration first, we need to know what a payment gateway is.

payment gateway is a merchant service provided by an e-commerce application service provider. Which authorizes card or direct payment processing.

Razorpay payment gateway provides quick and secure online transactions. It provides the clean and developer-friendly API and integration.

If you are interested in Razorpay payment and want Razorpay payment gateway integration in android with SDK then this blog will help you to do so.

Razorpay payment gateway work on the below steps:


1. Initial setup

Add below dependency in your app-level build.gradle file.

2. Initialize payment

SDK PaymentForm provides the UI interface for payment. So you have to create or initialize the view.

We are using the Razorpay Checkout activity that will contain the UI for payment. So we have to start the Activity for result like:


Key id is the Razorpay id collected from the dashboard.

3. Handling payment callback:

It’s time to handle the payment callback. For that, you need to extend the PaymentResultListener interface like below:

Implement abstract method like below:

For the release build add the below line in your proguard-rules.pro file



In this blog, you have learned about the implementation of the Razorpay payment gateway integration by using SDK.

For more information regarding the Razorpay payment gateway follow the link.

Thanks for reading this blog. You can also check other blogs from here.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*

Be the first to comment.


We've bought a Shopware Extension which is a hybrid App, which we can now offer in the Google Play Store and the IOS App Store. I'am still impressed how fast and how sharp the support team leads us through every process of the App-Store clarification. Very fast and useful response.

Markus Walter

Markus Walter

Founder, Das Apartment Living

Talk to Sales


Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home