| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) |
| Lines of code | 2278 |
| Technical Name |
pay_ke_mpesa_daraja |
| License | OPL-1 |
| Website | https://gencbaris.com/odoo_plugins/ |
| Versions | 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Discuss (mail)
• Invoicing (account) |
| Lines of code | 2278 |
| Technical Name |
pay_ke_mpesa_daraja |
| License | OPL-1 |
| Website | https://gencbaris.com/odoo_plugins/ |
| Versions | 18.0 19.0 |
Kenya M-Pesa Daraja for Odoo
STK Push checkout, C2B PayBill reconciliation and B2C payouts â Safaricom Daraja, bring-your-own-key
Collect and disburse money over Safaricom M-Pesa directly from Odoo. This connector speaks the published Daraja API end to end: it pushes an STK Push prompt to the customer's phone at checkout, ingests C2B PayBill confirmations and reconciles them against your open invoices, and sends B2C payouts to suppliers, staff or refunds.
Every credential is bring-your-own-key: you enter your own Safaricom consumer key/secret, business short code and Lipa-na-M-Pesa passkey. The module is the integration layer â it is not a payment service provider and bundles no merchant account.
What it does
STK Push checkout
Trigger a Lipa-na-M-Pesa Online prompt on the customer's handset. The
connector builds the documented password
base64(ShortCode + Passkey + Timestamp), submits the
processrequest, and tracks the CheckoutRequestID.
C2B PayBill reconciliation
Register your validation and confirmation URLs, ingest each PayBill payment, and auto-match it to the right open customer invoice by bill reference or payer phone â then reconcile in one click.
B2C payouts
Send Business, Salary or Promotion payments to any Safaricom number. The B2C SecurityCredential is RSA-encrypted from your initiator password and Safaricom's public certificate, or supplied pre-encrypted.
Key features
- OAuth2 client-credentials authentication against Daraja
- STK Push (M-Pesa Express) submit and status query
- Asynchronous STK callback handling with receipt capture
- C2B
registerurlfor validation/confirmation endpoints - Inbound C2B confirmation ingestion with receipt de-duplication
- Automatic invoice matching by bill reference and payer phone
- One-click reconciliation through Odoo's standard payment flow
- B2C disbursements (Business / Salary / Promotion)
- Kenyan MSISDN normalisation and whole-shilling KES validation
- Full, secret-redacted API call audit log per transaction
Daraja surface covered
| Capability | Daraja endpoint | Direction |
|---|---|---|
| Authentication | /oauth/v1/generate | Outbound |
| STK Push | /mpesa/stkpush/v1/processrequest | Outbound |
| STK status query | /mpesa/stkpushquery/v1/query | Outbound |
| C2B URL registration | /mpesa/c2b/v1/registerurl | Outbound |
| C2B confirmation | Your confirmation URL | Inbound |
| B2C payment | /mpesa/b2c/v1/paymentrequest | Outbound |
| B2C result | Your result URL | Inbound |
Bring your own keys
The connector stores nothing on our side. You configure your own Safaricom Daraja app credentials in Odoo (consumer key, consumer secret, business short code, passkey and B2C initiator). All calls go directly from your Odoo instance to Safaricom. We are not a certified aggregator or payment service provider; this is software that talks to your own M-Pesa account.
Built for Kenya
Amounts are validated as whole Kenyan Shillings (KES), and phone numbers are
normalised to the canonical 2547xxxxxxxx / 2541xxxxxxxx
form M-Pesa expects, whatever shape your customers type.
Screenshots
Api Call Log
Paybill Payments
Acquirers
New Transaction
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module