## 📲 Frappe Mpesa Payments
Frappe Mpesa Payments is a custom Frappe application that integrates with Safaricom's Daraja API. It is built to extend ERPNext enabling seamless mobile money payments from customers, and payment disbursements to suppliers and employees. Hence it implements the following APIs: Mpesa Express (STK Push), C2B (Customer to Business), B2C (Business to Customer) and Transaction Status (Query status of payment).
---
## Table of Contents
- 📲 Frappe Mpesa Payments
- 🚀 Project Overview
- Supported APIs:
- 1. ✅ **Mpesa Express (STK Push)**
- 2. ✅ **C2B (Customer to Business)**
- 3. ✅ **B2C (Business to Customer)**
- 4. ✅ **Transaction Status (Query status of payment)**
- 🛠️ Installation
- ✅ Dependencies
- ☁️ Managed Hosting Frappe Cloud
- 🧑🏿💻 Self Hosting
- ⚙️ Configuration
- Mpesa Settings
- 🤵🏿 Usage Guide
- 1. 🔁 Trigger STK Push (Mpesa Express)
- 2. 📥 Receive C2B Payments
- Notes:
- FAQs: What happens when Registration Fails?
- 3. 💸 Disburse B2C Payments (Business to Customer)
- 🧾Accounting Entries
- Use Cases
- 4. 🔍 Mpesa Payment Reconciliation
- 5. ❓Query Transaction Status
- Use Cases:
- Key DocTypes
- 🔐 Security
- 🛠️ Troubleshooting
---
## 🚀 Project Overview
With the growth of mobile money payments and digital cash transfers, this app was built to enable Kenyan businesses to automate and streamline payment collection, salary disbursement, and transaction tracking through Safaricom Mpesa — without leaving their ERPNext system.
## Supported APIs:
### 1. ✅ **Mpesa Express (STK Push)**
- This is a feature that allows suppliers/vendors to initiate a payment prompt on a customer's phone, prompting them to enter their M-Pesa PIN to authorize the transaction. It's a convenient and secure way for customers to pay, as it eliminates the need for customers to remember paybill/account numbers. It also reduces the time taken to receive payment
#### Use Cases
- Request payment from:
1. Sales Invoice (Credit)
2. Sales Order
3. POS (Point of …