Skip to content
pubscout

razorpay_flutter

1.4.7, released 2 months ago by razorpay.com

Flutter plugin for the Razorpay payment gateway SDK.

WASM-readyRock solid
$ flutter pub add razorpay_flutter
Source repository

What it does

Wraps native Android and iOS Razorpay SDKs to handle checkout, payment success, payment errors, and external wallets in Flutter applications.

AI-written summary of version 1.4.7, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to integrate Razorpay payments into your Flutter app.
  • You want to process standard checkout and order flows using native platform SDKs.

Skip it when

  • You are targeting platforms other than Android and iOS.
  • You need a backend-only payment processing client.

Strengths

  • Official plugin maintained by Razorpay.
  • Supports both Swift Package Manager and CocoaPods on iOS.
  • Provides clear error handling and event-based callbacks.

Weaknesses

  • Requires manual native configuration (minSdkVersioning for Android, deployment target and bitcode for iOS).
  • Limited platform support (only Android and iOS).

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
1

Requires setting minimum Android SDK to 19 or higher, adding Proguard rules if needed, and setting iOS minimum deployment target to 10.0.

import 'package:razorpay_flutter/razorpay_flutter.dart';

_razorpay = Razorpay();
_razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, _handlePaymentSuccess);
_razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, _handlePaymentError);
_razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet);

var options = {
  'key': '<YOUR_KEY_HERE>',
  'amount': 100,
  'name': 'Acme Corp.',
  'description': 'Fine T-Shirt',
  'prefill': {
    'contact': '8888888888',
    'email': 'test@razorpay.com'
  }
};

_razorpay.open(options);

Alternatives

Packages that do the same job and could replace razorpay_flutter.

Works with

Packages commonly used together with razorpay_flutter: ones it builds on, ones built on it, and its own family.