Mpesa SDK
Using the SDK
Using the SDK is simple and straightforward. Get it working in minutes!
Initialize the SDK
Use the Mpesa
class to initialize the SDK with your credentials. You SHOULD
store your credentials in a .env
file and use dotenv
to load them into your
application.
STK Push
STK Push is a service that allows you to receive payments on the go from your customers. It is a simple and secure way to receive payments from customers using M-Pesa. The service is available on the Paybill and Buy Goods and Services platforms.
B2C
B2C is a service that allows you to send money to any mpesa mobile number in Kenya.
Check Transaction Status
Check the status of a transaction using the TransactionID
returned from the
B2C
or STK Push
request.
Check mpesa business accounts Balance
Check the balance of your business account