Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Hey! Folks 👨🏻💻 today we’ll integrate the RazorPay Payment Gateway in Flutter.
Before we get started I urge you to go and check out our Flutter App Development Company.
Let’s start the party.
Create a fresh project to integrate the Razorpay Payment Gateway in Flutter.
Add Razorpay_flutter in pubspec.yaml file.
If you are using Proguard for your builds, you need to add the following lines to the Proguard files:
Note: If there is no proguard file in Android app level then create a new file in
the directory – android/app/proguard-rules.pro
Now run the command in the terminal – flutter pub get
Minimum Version Requirement
Create a Razorpay instance.
Attach event listener to listen to the changes at payment gateway sdk.
Creates handler for listeners.
Add this line after the payment gets successful and in dispose method.
razorpayOrderId you need to generate this orderId for payment.
you can generate test orderId in postman.
After the successful request, you’ll get this response.
Check the full Code for the Razorpay Payment gateway.
main.dart file
razorpay_payment_screen.dart
After the payment gets successful you can check the Razorpay dashboard.
NOTE: There is some issue in Razorpay SDK.
If you’re getting this issue “type ‘String’ is not a subtype of type ‘Map<dynamic, dynamic>?’ in type cast”
You need to add some code in their SDK.
in razorpay_flutter.dart file replace this code with existing code in PaymentFailureResponse function.
Before-
After- Line no – 140
That’s all for this Article 🎊 .
Razorpay Payment Gateway in Flutter in this blog we’ve learned how to integrate the razorpay into Flutter app.
Visit the link for Razorpay’s official documents.
Thanks for reading this blog. You can also check other blogs from here for more knowledge.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Webkul is a truly trusted and supported IT Company to develop business ideas for e-commerce. They provide professional support after deploying the solution to production and be responsible to act for fixing the reported issues or system errors. We highly encourage to deal with Webkul for business development.
Hussein Zawia
Co-founder, 24Dokan
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.