1. How to handle situations where a customer has pressed the Back button on the browser before the payment is complete?
You can use theonBackPressed method to handle a situation where the customer has pressed the Back button before completing the payment. This marks the payment as failed on the Dashboard.
onBackPressed Method
2. How to change API keys?
You can change API keys after you have already initialized theRazorpay object by calling razorpay.changeMerchantKey(merchantKey). This is an optional method that overrides the existing API key. The new key is used for authenticating the requests sent to Razorpay.
API Key Change
3. How can I check the Razorpay Android Custom SDK version?
To check the SDK version:- Open your Android project in Android Studio.
-
Navigate to the
build.gradlefile of your app module (usuallyapp/build.gradle). -
Locate the
dependenciesblock in the file. -
Find the line that includes the Razorpay SDK dependency. The version number will be alongside the SDK name in the format
x.y.z.build.gradle
4. How can I update the Razorpay Android Custom SDK version?
To update the Custom Android SDK, follow these steps:- Check the latest SDK version.
-
In the app-level gradle build file, update the SDK version to the latest release.
Update SDK
- After updating, sync gradle and check for any compile-time errors.
- Ensure all changes are correctly integrated and the application functions as expected.
Handy TipsFrom version 3.9.22 onwards, the latest version is automatically updated, eliminating the need for manual updates.
5. I received a policy violation notice from Google Play Store when trying to publish my Razorpay-integrated app. How do I proceed?
This error appeared due to an intent redirection issue that was present in the older versions of the Razorpay Android Custom SDK. To resolve this, please upgrade to the latest SDK version.6. How to fetch Subscription details?
If you are using Subscriptions, you can use this code sample to fetch the subscription details:Fetch Subscription
7. How to fetch Subscription amount?
If you are using Subscriptions, you can fetch the subscription amount by calling thegetSubscriptionAmount method.
Fetch Subscription Amount