M-Pesa Payments for Perfex CRM

Bluehost Shared Hosting

NOTE: This is a module for Perfex CRM. Not a standalone script.

Brief Description

Let your Kenyan customers pay Perfex CRM invoices with M-Pesa. Payments are recorded against the right invoice automatically, and your team gets the tools to reconcile anything that doesn’t match.

Payment methods

  • STK Push (Lipa na M-Pesa Online): the customer enters their number on the invoice and approves the payment with their PIN.
  • Paybill: customers pay from the M-Pesa menu with the invoice number as the account number.
  • Buy Goods (Till): customers pick their till payment from a list and it is verified against the invoice.
  • Staff can start an STK Push from the M-Pesa button on the admin invoice toolbar.

Automatic reconciliation

  • Matches by invoice number, or by amount (±1 KES), date (±2 days) and the payer’s phone.
  • Unmatched payments are retried by cron for 30 days.
  • Duplicate receipt codes are rejected, so a payment is never recorded twice.

Payment Logs and tools

  • Payment Logs with All, Matched and Unmatched filters and search.
  • Link an unmatched payment to an invoice in one click, with an audit timeline.
  • Transactions list with filters and CSV export.
  • Transaction Query to check a receipt at Safaricom.
  • Buy Goods reconciliation screen.

Admin features

  • Dashboard wallet balance widget with Good, Low and Critical status.
  • One-click C2B URL registration.
  • Sandbox (test) mode.
  • API credentials encrypted at rest and masked on screen.
  • Separate staff permissions for Tools, Transactions and Buy Goods reconciliation.
  • An illustrated internal Knowledge Base guide for your staff, created on install.
  • No Perfex core files are modified.

Requirements

  • Perfex CRM 3.0 or newer (tested on 3.4.1)
  • PHP with cURL and OpenSSL (tested on PHP 8.4)
  • HTTPS domain
  • Safaricom Daraja account; Paybill or Till with API access for production
  • Invoices in KES

Changelog

v1.0.5: Payment Logs, auto-matching, balance widget, admin invoice button, permissions, KB guide v1.0.0: Initial release

M-Pesa is a registered trademark of Safaricom PLC. This item is an independent product and is not affiliated with, endorsed by or sponsored by Safaricom PLC. Screenshots are illustrations.

0 average based on 0 ratings.

Swivernet

Swivernet

Visit Author's Portfolio

View Portfolio
Last Update 2026-11-30
Created 2026-11-30
Sales 0
Discussion Comments
Compatible Browsers IE6 IE7 IE8 IE9 IE10 IE11 Firefox Safari Opera Chrome Edge
Software Version PHP 8.x
High Resolution Yes
Software Framework CodeIgniter
Files Included JavaScript JS JavaScript JSON HTML CSS PHP
Video Preview Resolution