A flutter plugin for integrating Mobile Money Payments to your flutter apps

Add Mobile Money payments to your flutter apps using the FlutterWave api gateway.


  • Recieve Payments through Mobile Money in Uganda
  • Supports MTN Momo Transactions
  • Supports Airtel Money Transactions
  • Verify Charges your have made before adding value

Getting started

Get your api keys, head over to https://dashboard.flutterwave.com/settings/apis

You might also want to read about flutterwaves documentation. For this head to https://developer.flutterwave.com/reference


Create an instance of the UgandaMobileMoney class.

const secretKey = "FLWSECK-XXXXX-X"; // flutterwave secret key
UgandaMobileMoney _mobileMoney = UgandaMobileMoney(secretKey); 

Initiate Payments

void chargeClient() async {
    MomoPayResponse response = await _mobileMoney.chargeClient(
            txRef: "MC-01928403", // should be unique for each transaction
            amount: "1500", // amount in UGX you want to charge
            email: "tst@gmail.com", // email of the person you want to charge
            phoneNumber: "256123456723", // clients phone number
            fullname: "Ojangole Joran", // full name of client
            redirectUrl: "https://yoursite.com", // redirect url after payment
            voucher: "128373", // useful for vodafone. you can ignore this
            network: UgandaNetwork.mtn // network, can be either mtn or airtel


To Verify transactions

   void verifyTransaction() {
    _mobileMoney.verifyTransaction(taxRef).then((value) {
      if (value == TransactionStatus.failed) {
            .showSnackBar(SnackBar(content: Text("Failed")));
      } else if (value == TransactionStatus.pending) {
            .showSnackBar(SnackBar(content: Text("Pending")));
      } else if (value == TransactionStatus.success) {
            .showSnackBar(SnackBar(content: Text("Success")));
      } else if (value == TransactionStatus.unknown) {
            .showSnackBar(SnackBar(content: Text("Unknown")));
      } else {
            .showSnackBar(SnackBar(content: Text("Unknown")));

Additional information

Please contact me if your have any feature requests or file issues via the respository.

You can also buy me a rolex : https://dashboard.flutterwave.com/donate/7nacgysd7ilf


View Github

Entradas similares

Deja una respuesta