Cecypo Pos Mpesa
Quick mpesa payments in ERPNext Point of Sale
- Author: Cecypo-Tech
- Repository: https://github.com/Cecypo-Tech/cecypo_pos_mpesa
- GitHub stars: 1
- Forks: 1
- License: NOASSERTION
- Category: Retail
- Maintenance: Minimally Maintained
Install Cecypo Pos Mpesa
bench get-app https://github.com/Cecypo-Tech/cecypo_pos_mpesa
Add the Frappe Gems badge to your README
Maintain Cecypo Pos Mpesa? Paste this into your README:
[](https://frappegems.com/gems/apps/Cecypo-Tech/cecypo_pos_mpesa)
About Cecypo Pos Mpesa
Mpesa for POS
Mpesa for POS integration for ERPNext - adds a "Quick Pay - Mpesa" button to the Point of Sale interface for quick payment processing using Mpesa C2B Payment Register.
Features
- ✅ Quick Pay Button in Point of Sale checkout screen
- ✅ Search & Select unused Mpesa C2B payments - Built for Sale Teams in mind; 3 character search required (matching name/phone/txnid)
- ✅ Multiple Payment Selection - apply multiple Mpesa payments to a single invoice
- ✅ Payment Age Indicators - visual indicators showing payment age
- ✅ Exact Match Detection - highlights payments matching invoice amount
- ✅ Overpayment Warnings - alerts when payments exceed outstanding amount
- ✅ STK Push Requests - send payment requests directly from POS
- ✅ Auto-save/Submit - optional automatic invoice processing
Screenshots
Button:
Mpesa payment selection:

Requirements
- ERPNext: v15
- frappempsapayments: This app is only an extension to https://github.com/navariltd/frappe-mpsa-payments/
Installation
# Get the app
cd frappe-bench
bench get-app https://github.com/Cecypo-Tech/cecypo_pos_mpesa.git
# Install on your site
bench --site [your-site] install-app cecypo_pos_mpesa
# Migrate to create custom fields
bench --site [your-site] migrate
# Build assets
bench build --app cecypo_pos_mpesa
# Restart
bench restart
Setup
- Ensure that the mode of payment for mpesa is
Phone - This needs Navari's MPESA app. If already in use and correctly setup, this will work straight out of the box!
Payment Request (STK Push) [BETA]
- Click "Quick Pay - Mpesa"
- Click "Request Payment" button
- Enter customer's phone number
- Click "Send Request"
- Customer receives STK push on phone
How It Works
- Dialog shows DRAFT Mpesa C2B Payment Register entries (docstatus=0)
- User searches and selects payments to apply
- When processing:
- Mpesa C2B Payment Register is submitted (docstatus → 1)
- Customer and Mode of Payment are linked
- Payment row is added to POS Invoice's payments table
- Mpesa entry is linked to POS Invoice
- Invoice is saved (and optionally submitted)
Troubleshooting
Button Not Showing
- Hard refresh browser (Ctrl+Shift+R)
- Verify you're on the checkout/payment screen
- Check browser console for errors
- Verify Mpesa is configured:
// Run in console
frappe.call({
method: 'cecypo_pos_mpesa.api.pos_quick_pay_mpesa_process',
args: {
action: 'check_mpesa_available',
company: cur_pos.frm.doc.company
},
callback: r => console.log('Available:', r.message)
});
No Payments in Dialog
- Check Mpesa C2B Payment Register for DRAFT entries
- Verify
businessshortcodematches Mpesa Settings - Ensure payments haven't been submitted already
- Try searching (min 3 characters) - values to match are NAME / PHONE / TRANS ID
Validation Errors
- "Mode of Payment is required": This is now fixed in v1.0.0
- "Cannot add payments to cancelled invoice": Invoice was cancelled, create new one
- "No Phone type Mode of Payment configured": Set up Mode of Payment with Type="Phone"
Technical Details
API Endpoints
Method: cecypo_pos_mpesa.api.pos_quick_pay_mpesa_process
Actions:
- check_mpesa_available - Validates Mpesa configuration
- get_mpesa_payments - Fetches pending payments with optional search
- process_mpesa - Processes selected payments and adds to POS Invoice
- get_customer_phone - Gets customer phone from contacts
- create_payment_request - Creates STK push payment request
Custom Fields Added
Mpesa C2B Payment Register:
- pos_invoice (Link to POS Invoice) - Tracks which POS Invoice the payment was applied to
License
AGPL-3.0
Credits
Built on top of frappe_mpsa_payments by Navari Limited.
Related Retail apps for Frappe & ERPNext
- Ury — URY - FOSS restaurant management system super powered by ERPNext.
- Webshop — Open Source eCommerce Platform
- Ecommerce Integrations — Ecommerce integrations for ERPNext
- Posnext — A modern, high-performance Point of Sale system for ERPNext with offline capabilities, real-time updates, and intuitive UI.
- Woocommerceconnector — Integration App for ERPNext to connect to WooCommerce
- Woocommerce Fusion — WooCommerce connector for ERPNext v15
- Go1 Webshop — Go1 Webshop is an Open Source eCommerce portal built on frappe builder.
- Retail Suite — is a modern POS system built with Tailwind CSS on the frontend and Frappe as the backend. It is designed for small retail businesses