Logo Lanfrica

devthagichu/mpesa-express

Domaine:

digital infrastructure

Type de record:

software
Créateur:
dev
Hôte:
The Library is a wrapper around Safaricom's Daraja API that can be used in Node JS Applications # MPESA EXPRESS Mpesa Express is an open source library Designed, Developed and Maintained by Dev Thagichu [ github.com ]. The Library is a wrapper around Safaricom's Daraja API that can be used in Node JS Applications Safaricom Daraja API: developer.safaricom.co.ke ## support - [x] Typescript - [x] Promises ## Getting Started ### Installation ```bash npm install mpesa-express or yarn add mpesa-express ``` Add to project ```typescript const Mpesa = require ('mpesa-express'); // Initialize with options const options = { // Cousumer Key and Consumer Secret are found on your Client Dashboard // developer.safaricom.co.ke consumer_key: " ", consumer_secret: " ", // Passkey , Business Shortcode and Shortcode are found on the Test Credentials Page // developer.safaricom.co.ke passkey: " ", // bfb279f9aa9bdbcf158e97dd71a467cd2e0c893059b10f78e6b72ada1ed2c919 BusinessShortCode: " ", // 174379 ShortCode: " ", //600000 // Secruity Credentials is generated by adding the consumer secret as // the Initiator Security Password and clicking Generate Credentials SecurityCredential: " ", //Safaricom147! Initiator: " ", //testapi callBackBaseUrl: " ", }; const mpesa = new Mpesa(options) ``` ### Features ### Lipa Na M-Pesa Online Payment API ###### Use this API to initiate online payment on behalf of a customer. developer.safaricom.co.ke ```typescript // The Lipa Na M-Pesa Online Payment options are found on the API Section under Lipa Na M-Pesa Online Payment API // developer.safaricom.co.ke // The transaction amount you want to simulate const Amount = " " // 1 // The Transacting Mobile Number const PhoneNumber = " " // 2547xxxxxxxx // Any Refferance or ID that you would what to associate the // transaction with const AccountReference = " " // In …