Skip to content
This repository has been archived by the owner on Dec 9, 2018. It is now read-only.
Mark Njung'e edited this page May 12, 2018 · 4 revisions

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.
);
Clone this wiki locally