GitPedia

Android mpesa api

Android MPESA SDK Library to provide smooth MPESA Experience in Android - Dubbed Daraja

From jumaallan·Updated June 27, 2026·View on GitHub·

This is a simple Android M-PESA SDK to allow you to integrate Safaricom M-PESA API dubbed ***Daraja*** in your Android App with ease without knowing a thing. It’s easy. I promise. :rocket: The project is written primarily in Kotlin, distributed under the MIT License license, first published in 2018. Key topics include: android, android-library, daraja, daraja-api, daraja-mpesa.

Latest release: v2.0.0
June 20, 2022View Changelog →

Android M-Pesa Daraja SDK

This is a simple Android M-PESA SDK to allow you to integrate Safaricom M-PESA API dubbed Daraja in your Android App with ease without knowing a thing. It’s easy. I promise. :rocket:

This version only offers the MPESA Express (STKPush) Support.

Download

Daraja available for download on mavenCentral()

Kotlin

kotlin
dependencies { implementation("com.androidstudy.daraja:daraja:2.0.2") }

Groovy

groovy
dependencies { implementation 'com.androidstudy.daraja:daraja:2.0.2' }

Quick Start

WIP - need to be updated

Requirements

  • AndroidX
  • Min SDK 14+
  • Java 8+

Lipa na M-Pesa Online Payment API

The following table highlights the requirements needed by Daraja, as described in the Safaricom Developer API Page

NameDescriptionParameter TypePossible Values
BusinessShortCodeThe organization shortcode used to receive the transactionNumericShortcode (6 digits)
PasskeyLipa Na Mpesa Online PassKeyAlpha-Numeric
AmountThe amount to be transactedNumeric100
PhoneNumberThe MSISDN sending the fundsNumericMSISDN (12 digits)
CallBackURLCall Back URLURLhttps://ip or domain:port/path
AccountReferenceAccount ReferenceAlpha-NumericAny combinations of letters and numbers
TransactionDescDescription of the transactionStringany string of less then 20 characters

Get the Pass Key Here : https://developer.safaricom.co.ke/test_credentials

Contributors

Showing top 12 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from jumaallan/android-mpesa-api via the GitHub API.Last fetched: 6/29/2026