Logo Lanfrica
  • Accueil
  • Atlas
  • Analyses
  • Documentation
  • Sign in

© 2026 Lanfrica. Tous droits réservés. Tous les droits d'auteur des ressources affichées sur le site Web Lanfrica appartiennent aux détenteurs de droits d'auteur d'origine, sauf indication contraire explicite.

nielsero/mpesa-sdk

Domaine:

digital infrastructure

Type de record:

software
Créateur:
nie
Hôte:
Type safe SDK for M-Pesa API (Mozambique) # mpesa-sdk Type safe SDK for M-Pesa API (Mozambique) ## Features - C2B Payment - B2C Payment - B2B Payment - Query Transaction Status - Query Customer Name - Reversal ## Installation ```sh npm install mpesa-sdk ``` ## Usage ### Configuration ```ts import MPesa from "mpesa-sdk"; const mpesa = new MPesa({ mode: "sandbox", apiKey: , publicKey: , origin: "developer.mpesa.vm.co.mz", serviceProviderCode: "171717" }); ``` > **Note:** For security reasons, it is a best practice to store sensitive information such as `apiKey` and `publicKey` in environment variables rather than hardcoding them directly in your code. ### C2B Payment ```ts async function main() { const data = await mpesa.c2bPayment({ amount: 10, msisdn: "258843330333", transactionReference: "T12344C", thirdPartyReference: "11114", }); console.log(data); } main(); ``` ### B2C Payment ```ts async function main() { const data = await mpesa.b2cPayment({ amount: 10, msisdn: "258843330333", transactionReference: "T12344C", thirdPartyReference: "11114", }); console.log(data); } main(); ``` ### B2B Payment ```ts async function main() { const data = await mpesa.b2bPayment({ amount: 10, receiverPartyCode: "979797", transactionReference: "T12344C", thirdPartyReference: "11114", }); console.log(data); } main(); ``` ### Query Transaction Status ```ts async function main() { const data = await mpesa.queryTransactionStatus({ queryReference: "5C1400CVRO", thirdPartyReference: "11114", }); console.log(data); } main(); ``` ### Query Customer Name ```ts async function main() { const data = await mpesa.queryCustomerName({ msisdn: "258843330333", thirdPartyReference: "11114", }); console.log(data); } main(); ``` ### Reversal ```ts async function main() { const data = await mpesa.reversal({ transactionId: "49XCDF6", securityCredential: "Mpesa2019", initiatorIdentifier: "MPesa2018", thirdPartyReference: "11114", reversalAmount: "10", }); console.log(data); } main(); ``` ## License This proje …

Visit

github.com

Languages

Lusengo

Licenses

MIT

Similaires

dere7/mpesa-sdkMaerih/Mpesa-SDKamlaksil/mpesa-sdkanthrodjear/mpesa-sdkkenikiara/mpesa-php-sdkkarson/mpesa-php-sdk

dere7/mpesa-sdk

Java SDK for Mpesa payment API # Java M-Pesa Payment SDK This project integrates with the **Mpes

Maerih/Mpesa-SDK

Implement Mpesa-SDK using java for easy and faster processing of payments. # mpesa-java-sdk A java

amlaksil/mpesa-sdk

A Python SDK for integrating M-Pesa services, including STK Push, C2B, and B2C payments, with easy-t

anthrodjear/mpesa-sdk

A multilanguage SDK for the Safaricom M-Pesa Daraja API (STK Push, STK Query, OAuth) # M-Pesa Daraj

kenikiara/mpesa-php-sdk

A PHP sdk for the new Mpesa RESTful APIs **Introduction** This package seeks to help php developer

karson/mpesa-php-sdk

A PHP sdk for the new Vodacom Mpesa RESTful APIs :mozambique: # Mpesa Mozambique PHP SDK A co