Daraja Kit

open source

Daraja Kit

Daraja kit is a typesafe Javascript library designed to simplify interactions with the Safaricom Daraja API.

Tech Stack

typescriptjavascriptLarge

Take a look at some of the site screenshots.

Slide 1 of 1
test
test
test

This library is suitable for both Node.js and React environments, allowing developers to seamlessly integrate M-Pesa payments into their applications in an efficient, modern and stress free manner.

It is a collection of types and utility functions that significantly improve the developer expereience when integrating Safaricom`s daraja api.

Benefits

If you are a developer here are the advantages of using the library in your own apps.

  • Cached access tokens to minimize network requests and improve performance.
  • Way simpler API over using daraja on your own.
  • Open source!
  • Slow integration. You don`t have to hot swap this library. You can easily integrate it to your app.
  • More Util Functions. If you need to generate passwords if you have decided to slowly integrate the app offers helper functions to help you move along nicely. e.g generateTimestamp and generatePassword.

Project outcome

  1. Created a Typescript Daraja API wrapper that caches access tokens, provides essential types, and includes additional features.
  2. Developed both the library and the accompanying documentation.
  3. Utilized a stack and tools including Typescript, Git, GitHub, NPM, Changesets library, and GitHub actions.
  4. Documented the project using NextJS, Tailwind CSS, React, Typescript, Javascript, HTML (HTML5), and CSS (CSS3).

You can check out the library on github.

Designed withheart