I’m working on a Flutter application that focuses only on the client side and uses API calls for server-side operations.
I need to figure out how to receive notifications or confirmations about UPI payment outcomes (success, pending, or failure) once users finish their payment process through applications like GPay or Paytm.
Given that my application doesn’t handle any server-side payment processing, what’s the best way to monitor or capture UPI payment results directly?
I would appreciate any methodology recommendations or plugin suggestions. If Flutter doesn’t support this directly, I’m open to native Android solutions using Kotlin or Java as an alternative.
I’ve tested several UPI-related packages, but they seem outdated and don’t appear reliable for production use.
interesting challenge! you could use url_launcher to trigger the UPI intent, then listen for when your app gets focus back. are you tracking transaction IDs to follow specific payments? have you tried activity lifecycle callbacks to catch when users return from the payment app?
yeah, without backend you’ll be fumbling! UPI needs that server gruntwork to verify payments. like, use intent payments and onActivityResult to nab users back from GPay/Paytm, then poll your own API for the status. ditch those flutter UPI packages, they’re mostly a wreck!
I’ve dealt with this exact UPI integration issue before. Here’s what works: set up polling + deep linking since you can’t use backend processing. First, create a custom URL scheme so payment apps can bounce back to your app after the transaction. When users return via that deep link, start polling your server’s transaction status endpoint regularly. Your server handles the actual payment verification through webhook notifications from the gateway. I always combine App State management with timer-based polling - pause when the app goes background, resume when it’s active again. On Android, use Intent filters with custom schemes and BroadcastReceiver if you want better control over detecting the payment flow.