Skip to content
A flutter plugin for integrating razorpay payment gateway. Supports Android and iOS.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea
android Added androidX support Mar 22, 2019
example minor issue fixed related to migration to swift 5. Apr 25, 2019
ios minor issue fixed related to migration to swift 5. Apr 25, 2019
lib android plugin working Nov 7, 2018
.gitignore Initial razorpay Plugin Nov 7, 2018
CHANGELOG.md Initial razorpay Plugin Nov 7, 2018
LICENSE Initial razorpay Plugin Nov 7, 2018
README.md
pubspec.yaml Added androidX support Mar 22, 2019
razorpay_plugin.iml
razorpay_plugin_android.iml

README.md

Flutter Razorpay Plugin

image

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.2.9

Using

import 'package:razorpay_plugin/razorpay_plugin.dart';
  startPayment() async {
    Map<String, dynamic> 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<String, String> notes = new Map();
    notes.putIfAbsent('key', () => "value");
    notes.putIfAbsent('randomInfo', () => "haha");
    options.putIfAbsent("notes", () => notes);
    options.putIfAbsent("api_key", () => "API_KEY_HERE");
    Map<dynamic,dynamic> 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 sucessfull message will contain the payment_id from razorpay.

Demo app

Apps using this library

  • Worth It - Best Deals, Offers & Discounts Android | iOS
You can’t perform that action at this time.