Home - MarkNjunge/PesaLib GitHub Wiki
Welcome to the PesaLib wiki!
PesaLib is an unofficial NodeJS library for M-Pesa.
Getting started
You will need to get a consumer secret and consumer key from the developer portal.
When testing, you can get businessShortCode and passKey from the test credentials page.
Example
// For Javascript use
// const PesaLib = require("pesa-lib").default;
import PesaLib from "pesa-lib";
const pesalib = new PesaLib(
consumerKey,
consumerSecret,
businessShortCode,
passKey,
false // Use 'true' to change to live url.
);