All callback urls uses ngrok api to expose localhost online!!

BACKEND USING NODE.JS

Folder structure

Your folder structure

Package json

Install all packages

Main Index.js

Main app ->index.js requires.

Main Index.js

DB connection and middlewares.

Model(phone)

Your model/phoneNumbers.js

Model(mpesa messages)

Your model/mpesa.js

Main Index.js

Get Accesstoken and Send a register url to safaricom.Get Accesstoken thro- middlewares.

Main Index.js

Simulate actions.

Main Index.js

Push an stk to the registered User!!.

Did you find this helpful?

Find me on github & Linkedln

star.rate.contribute to this doc

More resources-: source code

©Copyright 2022. franc_pro