| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Point of Sale (point_of_sale)
• Discuss (mail) • Inventory (stock) • Invoicing (account) |
| Lines of code | 960 |
| Technical Name |
pos_mpesa_stk |
| License | OPL-1 |
| Website | https://smaldynamics.com |
| Versions | 17.0 18.0 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Point of Sale (point_of_sale)
• Discuss (mail) • Inventory (stock) • Invoicing (account) |
| Lines of code | 960 |
| Technical Name |
pos_mpesa_stk |
| License | OPL-1 |
| Website | https://smaldynamics.com |
| Versions | 17.0 18.0 19.0 |
M-Pesa / Mpesa STK Push for Odoo POS
Collect M-Pesa (Mpesa) payments directly from the Odoo Point of Sale screen using Safaricom Daraja STK Push.
This module adds a dedicated M-Pesa payment method to Odoo POS. Cashiers can enter the customer's phone number, trigger an STK Push, and see the payment status update in real time, without leaving the POS interface or using a separate device.
All Daraja credentials (consumer key/secret, shortcode, passkey, environment, callback URL) are configured from Odoo settings, making the app suitable for any Kenyan business that accepts M-Pesa via PayBill or Till.
Key Features
-
Direct STK Push from POS
Start an M-Pesa STK Push from the POS payment screen with one click, using a customer phone number captured at checkout.
-
Real-time Status Tracking
The POS polls the backend for the transaction status and updates the payment line as completed or failed, with clear error messages on failure.
-
Configurable Credentials
Daraja consumer key, secret, shortcode, passkey, environment (sandbox/live), and callback URL are stored in Odoo system parameters and can be changed without code.
-
Kenyan Phone Validation
The popup validates Kenyan mobile numbers (07/01 prefixes) and normalizes them to the required 254XXXXXXXXX format before sending to Daraja.
-
Manual M-Pesa Option (Downtime Fallback)
If Daraja or STK Push is unavailable, cashiers can still record M-Pesa payments by entering the customer's phone number and the confirmation code manually on the POS payment line, ensuring sales are not blocked during downtime.
-
Back-office Transaction View
Each STK Push creates an
mpesa.transactionrecord with amount, phone number, reference, response, and callback data. Users can view, search, and inspect all M-Pesa transactions from a dedicated backend menu for reconciliation and support.
Typical Flow
- The cashier adds products to an order in Odoo POS and clicks on the M-Pesa payment method.
- A popup asks for the customer's phone number (pre-filled from the customer record when available).
- The module sends an STK Push request to Safaricom Daraja using your configured credentials.
- The customer confirms the prompt on their phone.
- The POS polls the backend until the transaction is completed, failed, or times out, and updates the payment line.
For configuration details, please refer to the module documentation in Odoo or the README file.
For support or customization requests, contact: nathankirui5@gmail.com
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