Skip to content

wamaithaNyamu/Lipa-na-Mpesa-STK-Push-

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn

Product Name Screen Shot

Accompanying blog can be found here

Mpesa Express Daraja API integration in Nodejs and express

Sending user a prompt to pay for an order using the stk push API and also confirming the payment using the checkout request ID

Built With

To ensure you gain the most out of this session please make sure you have the following installed:

Getting Started

To run the webscrapper

Installation

  1. Clone the repo

    git clone https://github.com/wamaithanyamu/Lipa-na-Mpesa-STK-Push-.git
  2. Install NPM packages

    npm install
  3. Create a .env file and add the following values. Retrieve them from the Safaricom daraja portal here

       SAFARICOM_CONSUMER_SECRET=
       SAFARICOM_CONSUMER_KEY=
       PASS_KEY=
       BUSINESS_SHORT_CODE=
       PORT=3000 # port your server will run on
  4. Run the server

    node server.js
  5. Use postman to make requests.

(back to top)

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Tweet me at- @wamaithanyamu or shoot me an email at [email protected]

Project Link: https://github.com/wamaithanyamu/Lipa-na-Mpesa-STK-Push-

(back to top)

About

STK push using nodejs and the Safaricom daraja API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published