Mpesa.Net 0.1.0

.NET Core 2.0
There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package Mpesa.Net -Version 0.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package Mpesa.Net --version 0.1.0
<PackageReference Include="Mpesa.Net" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mpesa.Net --version 0.1.0
#r "nuget: Mpesa.Net, 0.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mpesa.Net as a Cake Addin
#addin nuget:?package=Mpesa.Net&version=0.1.0

// Install Mpesa.Net as a Cake Tool
#tool nuget:?package=Mpesa.Net&version=0.1.0

An Mpesa Library for .Net A Daraja Rest API .Net Library written in C#. Well documented and Unit tested.


dotnet add package Mpesa.Net

Usage example

ExtraConfig configs = new ExtraConfig
        ShortCode = 600111,
        Initiator = "initiator",
        LNMShortCode = 12345,
        LNMPassWord = "....",
        SecurityCredential = "....",
        CertPath = "~/c-sharp-mpesa-lib/Mpesa/cert.cer"
Api mpesa = new Api(Env.Sandbox, "consumerKey", "consumerSecret", configs);

For more examples and usage, please refer to the Wiki.


  • OAuth
  • AccountBalance
  • B2B
  • B2C
  • C2BSimulate
  • C2BRegister
  • LipaNaMpesaOnline
  • LipaNaMpesaQuery
  • ReversalRequest
  • TransactionStatus

Development setup

Assuming you have dotnet installed, To setup development environment just clone and get working 😃

git clone
cd Mpesa.Net
dotnet test

Release History

  • 0.1.0
    • The first proper release
    • INTRODUCED: CommandID() and IdentityParty()
    • Added Testing and Comprehensive Documentations
  • 0.0.1
    • Work in progress


Geoff Mureithi – @GeoMureithi

Distributed under the Apache-2 license. See LICENSE for more information.


  1. Fork it (
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.1 627 1/1/2019
0.1.0 487 12/31/2018