A new Momo Payment plugin.

Getting Started


1. Android set up:

  • Step 1: Request Internet permission at AndroidManifest.xml file:
<uses-permission android:name="android.permission.INTERNET" />

2. iOS set up:

  • Step 1: Update Info.plist file as below:
  • Step 2: Define call back url for momo at AppDelegate.swift file:
import momo_payment_plugin
override func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {
        MoMoPayment.handleOpenUrl(url: url, sourceApp: sourceApplication!)
        return true

override func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any]) -> Bool {
        MoMoPayment.handleOpenUrl(url: url, sourceApp: "")
        return true

Get more at:

How to user plugin?

  • Step 1: Import :
import 'package:momo_payment_plugin/momo_payment_data.dart';
import 'package:momo_payment_plugin/momo_payment_plugin.dart';
import 'package:momo_payment_plugin/momo_payment_result.dart';
  • Step 2: Use MomoPaymentPlugin to
MomoPaymentData momoPaymentData = MomoPaymentData(
  appScheme: "[your_appScheme]",
  merchantname: '[your_merchantname]',
  merchantcode: '[your_merchantcode]',
  amount: 2000,
  orderId: 'orderId',
  orderLabel: 'orderLabel',
  merchantnamelabel: "sdsds",
  fee: 200,
  description: null,
  requestId: 'requestId',
  partnerCode: '[your_partnerCode]',

MomoPaymentResult momoPaymentResult =
    await MomoPaymentPlugin().requestPayment(momoPaymentData);

Detail of MomoPaymentData:

class MomoPaymentData {
String merchantname;
String merchantcode;
String appScheme;
int amount;
String orderId;
String orderLabel;
String merchantnamelabel;
int fee;
String description;
String requestId;
String partnerCode;
String extraData;
bool isDevelopmentMode;

Detail of MomoPaymentResult:

class MomoPaymentResult {
bool isSuccess;
int status; // isSuccess -> 0
String token;
String phonenumber;