to select ↑↓ to navigate
Frappe Mpesa Payments

Frappe Mpesa Payments

Prerequisites and Dependencies

Before installing Frappe Mpesa Payments, ensure the following requirements are in place. Missing any of these will cause the installation or certain features to fail.

Required

Frappe Framework

The application is built on top of Frappe Framework. You must have a working Frappe instance running a compatible version before installing this app.

ERPNext

ERPNext must be installed on the same site. The app extends ERPNext's Payment Request, Payment Entry, and related DocTypes to enable M-Pesa functionality.

Valid Daraja API Credentials

You need a live application registered on the Safaricom Developer Portal. This application must correspond to the Business Shortcode (Paybill or Till number) you own.

The following credentials are needed, depending on which APIs you intend to use:

Credential Required For
Consumer Key All APIs
Consumer Secret All APIs
Business Shortcode All APIs
Online PassKey Mpesa Express (STK Push)
Initiator Name B2C, Transaction Status
Initiator Password B2C, Transaction Status
Security Credential B2C
Till Number C2B (Buy Goods)

Contact M-Pesa Business or Safaricom API Support if you need help obtaining or activating these credentials.

M-Pesa Org Portal Access

For B2C disbursements and Transaction Status queries, you need access to the M-Pesa Org Portal to configure the API Operator (Initiator Name and Password).

Publicly Accessible HTTPS Domain

Safaricom's Daraja API delivers payment callbacks to a URL on your server. This means:

  • Your Frappe site must be accessible from the public internet.
  • The domain must use HTTPS since HTTP is not accepted by Daraja.
  • This applies to C2B payment notifications and STK Push result callbacks.

If you are self-hosting, ensure your server is behind a reverse proxy (such as Nginx) with a valid TLS certificate.

Optional

  1. Frappe HR
  • Required only if you intend to use B2C salary disbursements. Frappe HR provides the Salary Slip DocType that the app integrates with when paying employees.
  1. Frappe Lending
  • Required only if you intend to use B2C loan disbursements. Frappe Lending provides the Loan Disbursement DocType used for loan payouts.
Last updated 1 day ago
Was this helpful?
Thanks!