@coderafiki/mpesa-tsc
TypeScript icon, indicating that this package has built-in type declarations

1.0.35 • Public • Published

mpesa-tscwrapper

Wrapper for Mpesa Daraja Api using typescript

npm intall --save mpesa-tsc
yarn add mpesa-tsc  
import {Mpesa} from 'mpesa-tsc'
let mpesaService = new Mpesa(
    CONSUMER_KEY,  /* get this from mpesa */
    CONSUMER_SECRET,
    SANDBOX_SHORT_CODE,
    'random password',
    CALLBACK_URL /* to get responses from mpesa */
)
let response = mpesaService.lipaNaMpesaOnline({
     Amount: '500',
     PartyA: '254700123456',
     PhoneNumber: '254700123456',
     AccountReference: 'YOUR RANDOM REFERENCE CODE',
     TransactionDesc: 'description',
})

Readme

Keywords

none

Package Sidebar

Install

npm i @coderafiki/mpesa-tsc

Weekly Downloads

10

Version

1.0.35

License

ISC

Unpacked Size

48.5 kB

Total Files

18

Last publish

Collaborators

  • teapot418