DarajaMultiplatform
Kotlin Multiplatform wrapper for Daraja(M-Pesa) API for Kotlin and Swift clients
Install / Use
/learn @VictorKabata/DarajaMultiplatformREADME
Daraja Multiplatform
<p align="center"> <img src="assets/icon.png"> </p> <p align="left"> <img src="https://img.shields.io/badge/-ANDROID-3AA335?logo=kotlin&logoColor=white&style=for-the-badge"> <img src="https://img.shields.io/badge/-IOS-3AA335?logo=swift&logoColor=white&style=for-the-badge"> <img src="https://img.shields.io/badge/-DESKTOP-CCCCCC?logo=openjdk&logoColor=white&style=for-the-badge"> <img src="https://img.shields.io/badge/-WEB-CCCCCC?logo=javascript&logoColor=606060&style=for-the-badge"> </p>Kotlin multiplatform wrapper for Mpesa API dubbed Daraja API (Daraja means bridge in Swahili) that supports integration with your Android(Kotlin/Java), iOS(Swift) and JVM applications.
[!Note] M-PESA is a mobile money transfer service in Kenya that allows users to store and transfer money through their mobile phones.
[!Caution] Daraja Multiplatform is under heavy development and, despite being heavily tested, its API isn't yet stabilized; breaking changes might happen on minor releases. However, we will always provide migration guides.
Report any issue or bug <a href="/issues">in the GitHub repository.</a>
Table of Content
Prerequisite
To get started, you’ll need to create an account on the Daraja API portal to use the Daraja API. How to get started with Daraja API.
After successfully creating an account on the Daraja API portal and creating a new Daraja app, you’ll need to add your consumer key, consumer secret and pass key obtained from the Daraja API portal to your project.
[!Important] See the project's website for documentation.
Features
The SDK offers the following functionalities from the Daraja API:
- [x] Authorization - Gives you a time-bound access token to call allowed APIs.
- [x] M-Pesa Express - Merchant initiated online payments.
- [x] M-Pesa Express Query - Check the status of a Lipa Na M-Pesa Online Payment(M-Pesa Express).
- [x] Dynamic QR - Generates a dynamic M-PESA QR code.
- [ ] Customer To Business (C2B)
- [ ] Business To Customer (B2C) - Transact between an M-Pesa shortcode to a phone number registered on M-Pesa.
- [ ] Transaction Status - Check the status of a transaction.
- [ ] Account Balance - Enquire the balance on an M-Pesa BuyGoods (Till Number)
- [ ] Reversal - Reverses an M-Pesa transaction.
- [ ] Tax Remittance - This API enables businesses to remit tax to the Kenya Revenue Authority (KRA).
- [ ] Business Pay Bill - Pay bills directly from your business account to a pay bill number, or a pay bill store.
- [ ] Business Buy Goods - Pay for goods and services directly from your business account to a till number or merchant store number.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Licence
Daraja Multiplatform is an open-sourced software licensed under the Apache license. This is an unofficial library, it is not affiliated with nor endorsed by Safaricom. Contributions are welcome.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
