Skip to main content

Mobile SDKs

To troubleshoot this issue, follow this step:
  • Always use the latest SDK versions. Check the Changelog for updates.
When the user is trying to install apps from sources other than the Play Store / App Store and test them in a Production environment then Cashfree mobile SDK Android, React Native, Flutter, Cordova, Ionic, Capacitor will block the transaction.To troubleshoot this issue, follow these steps: The guidelines provided here to test app in production environments.
This issue occurs when there is an NDK version mismatch between your local setup and the SDK requirements.
To troubleshoot this issue, follow these steps:
  • Update the ndk.dir path in your local.properties file:
    ndk.dir=/path/to/ndk/<required_version>
  • Alternatively, open Android Studio > SDK Manager > SDK Tools, and install the required NDK version.
This issue occurs when Gradle cannot find the required Cashfree dependencies.
To troubleshoot this issue, follow these steps:
  • Add the following repositories inside android/build.gradle under allprojects > repositories:
    google()
    mavenCentral()
    maven { url "https://jitpack.io" }
To initialise a payment, follow these steps:
  • Use the method:
    CashfreePGSDK.doPayment(orderId, setEnvironment, setPaymentSessionId);
  • Ensure the following:
    • orderId and paymentSessionId are securely generated from your backend.
    • setEnvironment is either SANDBOX or PRODUCTION.
    • You specify the platform (for example, UPI, card, or netbanking).
This issue occurs in the sandbox (test) environment. Real UPI apps don’t launch because transactions are simulated.
To test UPI behaviour, follow these steps:
  • Use the Cashfree UPI simulator with sandbox credentials.
  • For end-to-end testing, use production mode with small payment amounts.
No. UPI Intent works only on supported mobile devices and mobile applications, because it opens an installed UPI app.On desktop websites, present UPI QR. Do not offer UPI Intent or UPI Collect on desktop, except where NPCI still allows Collect. See UPI Collect Flow Deprecation for QR setup, iOS support, and exemption details.
The payment_session_id_invalid error means the payment session ID is missing or does not exist. A common cause is an environment mismatch: the order was created in one environment and the SDK session points to another.To resolve this error:
  1. Create the order in the same environment that the app uses.
  2. Initialise CFSession with CFEnvironment.PRODUCTION for production orders, or CFEnvironment.SANDBOX for sandbox orders.
See React Native Integration for the session setup.
To troubleshoot this issue, follow these steps:
  • Run:
    flutter clean
    flutter pub get
  • If issues persist, delete the following directories:
    .gradle/
    .idea/

Server-Side SDKs

Sample integration kits