Mpesa Daraja SDK implementation for .net.
For More Info check Safaricom Mpesa Documentation
nugget install
using MpesaSDK.NET;
using MpesaSDK.NET.Dtos.Requests;
...
MpesaClient mpesaclient = new MpesaClient("consumerkey","secret");
var result = await mpesaclient.STKPush(...);
var result = await mpesaclient.StkPushQuery(...);
var result = await mpesaclient.B2C(...);
var result = await mpesaclient.B2B(...);
To get MPesa Security credetials for both B2B and B2C use method below.
string credential = "pass".MpesaSecurityCredential();
var result = await mpesaclient.C2BRegisterUrl(...);
var result = await mpesaclient.C2BSimulateTransaction(...);
var result = await mpesaclient.AccountBalance(...);
var result = await mpesaclient.TransactionStatus(...);
var result = await mpesaclient.Reversal(...);
Check sample callback api here
Docs to be updated soon.
Apache LICENSE-2.0 read more