https://github.com/dynamitechetan/razorpay_flutter
A flutter plugin for integrating razorpay payment gateway. Supports Android and iOS.
https://github.com/dynamitechetan/razorpay_flutter
flutter payment razorpay
Last synced: about 1 month ago
JSON representation
A flutter plugin for integrating razorpay payment gateway. Supports Android and iOS.
- Host: GitHub
- URL: https://github.com/dynamitechetan/razorpay_flutter
- Owner: dynamitechetan
- License: other
- Created: 2018-11-08T07:35:23.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-12T16:11:02.000Z (almost 6 years ago)
- Last Synced: 2025-03-26T10:05:05.380Z (6 months ago)
- Topics: flutter, payment, razorpay
- Language: Java
- Homepage:
- Size: 168 KB
- Stars: 31
- Watchers: 6
- Forks: 16
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Flutter Razorpay Plugin
A flutter plugin for razorpay integration for both android and ios.
#### If you use this library in your app, please let me know and I'll add it to the list.
### Installing
Add this in pubspec.yaml
```
razorpay_plugin: ^0.3.0
```
### Using
```
import 'package:razorpay_plugin/razorpay_plugin.dart';
``````
startPayment() async {
Map options = new Map();
options.putIfAbsent("name", () => "Razorpay T-Shirt");
options.putIfAbsent("image", () => "https://www.73lines.com/web/image/12427");
options.putIfAbsent("description", () => "This is a real transaction");
options.putIfAbsent("amount", () => "100");
options.putIfAbsent("email", () => "test@testing.com");
options.putIfAbsent("contact", () => "9988776655");
//Must be a valid HTML color.
options.putIfAbsent("theme", () => "#FF0000");
//Notes -- OPTIONAL
Map notes = new Map();
notes.putIfAbsent('key', () => "value");
notes.putIfAbsent('randomInfo', () => "haha");
options.putIfAbsent("notes", () => notes);
options.putIfAbsent("api_key", () => "API_KEY_HERE");
Map paymentResponse = new Map();
paymentResponse = await Razorpay.showPaymentForm(options);
print("response $paymentResponse");}
```
Response :
```
{"code": 0, "message": "payment cancelled by user"}
```
or
```
{"code": 1, "message": "rpz_asdw23axd223s"}
```
If payment is successful message will contain the payment_id from razorpay.### Demo app
![]()
![]()
## Apps using this library
- Worth It - Best Deals, Offers & Discounts [Android](https://play.google.com/store/apps/details?id=com.worthitproductions) | [iOS](https://itunes.apple.com/us/app/worthit-deals-discounts/id1450975646?ls=1&mt=8)