mpesa-daraja

Integrate M-Pesa payments with Safaricom's Daraja API for Kenyan applications.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/AfricanDigitalAssetFramework/africa-stack-skills --skill mpesa-daraja
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mpesa-daraja
Source: https://github.com/AfricanDigitalAssetFramework/africa-stack-skills/tree/main/east-africa/mpesa-daraja
Command: npx skills add https://github.com/AfricanDigitalAssetFramework/africa-stack-skills --skill mpesa-daraja

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Simplifies the integration of M-Pesa Daraja for Kenyan applications by providing a ready-to-use blueprint that handles authentication, payment flows, and callbacks.

Core Features & Use Cases

  • STK Push: initiate customer payments on their devices
  • C2B: register validation and confirmation callbacks for customer-to-business payments
  • B2C: disburse funds from business to customers
  • Balance & Transaction Status: query account details and transaction results
  • Comprehensive guidance for secure credential handling, environments, and webhook security

Quick Start

Ask the AI to set up a complete M-Pesa Daraja integration for a Kenyan app, including OAuth and callback handling.

Frequently Asked Questions about mpesa-daraja

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I integrate M-Pesa Daraja API for STK Push payments in a Kenyan app?

To integrate M-Pesa Daraja STK Push, you use OAuth 2.0 authentication, secure credential management, and proper shortcode usage to initiate customer payments on their devices. This Skill provides a ready-to-use blueprint for that flow.

How does C2B Pay Bill validation and confirmation work with the Daraja API?

C2B Pay Bill integration works by registering HTTPS callback URLs for validation and confirmation via the Daraja API. Secure webhook handling ensures your Kenyan application receives and processes customer-to-business payment notifications reliably.

Do I need HTTPS callbacks to handle B2C disbursements via Safaricom's Daraja API?

Yes, HTTPS callback handling is required to securely process B2C disbursement results from the Daraja API. You must also implement OAuth 2.0 authentication and proper shortcode usage to disburse funds from business to customers.

Can I query M-Pesa account balance and transaction status using the Daraja API?

Yes, you can query M-Pesa account balance and transaction status using the Daraja API. This requires OAuth 2.0 authentication and secure credential management to retrieve account details and transaction results for Kenyan merchants.

What is the best way to manage secure credentials when integrating M-Pesa Daraja?

The best way to manage secure credentials for M-Pesa Daraja integration involves following comprehensive guidance on environment setup and webhook security. Proper credential handling ensures safe OAuth 2.0 authentication across different deployment environments.