Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for M-Pesa C2B Payments Integration with ERPNext #40939

Open
maniamartial opened this issue Apr 10, 2024 · 0 comments
Open

Proposal for M-Pesa C2B Payments Integration with ERPNext #40939

maniamartial opened this issue Apr 10, 2024 · 0 comments

Comments

@maniamartial
Copy link
Contributor

maniamartial commented Apr 10, 2024

M-Pesa Express is integrated with ERPNext, and implemented to work with Standard ERPNext POS.

M-Pesa Express and Customer to Business (C2B), are integrated with ERPNext, and implemented to work with POS Awesome.

This is a proposal to integrate M-Pesa Customer to Business (C2B) payments with ERPNext’ s Standard Point of Sale (POS) system, to facilitate processing of customer Till and Paybill payments.

This integration will allow customers to make mpesa payments to a M-pesa till or paybill of a vendor/merchant, these payments will be received into ERPNext, and there-after will be used to reconcile against sales invoices, and POS invoices.

PRs for this effort will be made against, Payments, where the custom doctypes and associated code will reside, and ERPNext, for POS specific customizations.

These C2B payments, will be received in a custom M-Pesa Transaction Record Doctype, for each M-pesa till/paybill number (a business can have more than one M-pesa till/paybill number, and from here, these received payments will be reconciled against Sales Invoices in the below options:

  • [Implemented on POS Awesome] The M-Pesa Transaction Record will be linked to a particular customer, a Payment Entry is created, and the Payment Entry will be reconciled against the relevant Sales Invoices. Note: This will be a manual effort by the user, since there’s no way of knowing exactly from which customer/payer the payment was received from, since the customer/payer phone number is masked, and only the first name is shared by Safaricom Mpesa Daraja

  • [Implemented on POS Awesome] For POS, a POS Profile will be linked to M-Pesa C2B as one of the modes of payment. If a POS Profile has C2B has one of the modes of payment, then, on POS Payments screen, Mpesa Payments received against the till/paybill number, will be availed on a search dialog, and the user will select, one or more, to reconcile/pay the POS Invoice with.

    • [Not Implemented on POS Awesome] An enhancement on above, is to auto display M-Pesa Payment Register matching amount with POS Invoice, and have the user confirm with customer, if the name displayed is theirs, and by clicking confirm, the payment is used to reconcile/pay the said POS Invoice. This is usually standard on other POS systems in supermarkets, to facilitate speedy service to customers.
  • [Implemented on POS Awesome] Third option, and this is a somewhat additional implementation in away, is have a separate payments tab/screen from the Items picker one on POS.
    WhatsApp Image 2024-04-10 at 13 40 21

    • Display past sales invoices/pos invoices, for a selected customer on one section.

    • Display draft received Mpesa Payments on another section

    • Display unreconciled payment entries for the customer.

      • Then avail feature to reconcile this. Basically, a screen on POS that’s similar to Payment Reconcialition. If anything, the background implementation calls Payment Reconcialition, for the actual Reconciliation.

Implementation Plan

1. Existing Doctypes Utilization

  • Payment Entry

  • POS Invoice

  • Sales Invoice

  • Customer

  • Payment Request

  • Payment Gateway

  • Payment Gateway Account

  • Account

  • Point of Sale (POS) page

  • M-Pesa Settings

  • Mode of Payment

  • POS Profile
    Screenshot from 2024-04-09 14-56-57

  1. New Doctypes Creation

  • Mpesa C2B Payment Register URL

Screenshot from 2024-04-10 18-30-17

Define payment mode and link it with M-Pesa settings. This is similar to Mpesa C2B Register URL and plays similar role. Manage callback notifications for transaction updates.

Fields: mpesa settings, company, mode of payments.

  • Mpesa C2B Payment Register

test2

Store transaction details post successful M-Pesa payment. This is similar to Mpesa Payment Register found in POS awesome and plays the same functionality.

Fields: Full Name, Transaction type, Posting Date, date, Transa ID, Transa Time, Trans Amount, Business Short code, invoice Number, Default Currency, Customer, Mode of Payment, Submit payment, First name, Org Account Balance.

Affected Repositories

  • erpnext

  • payments

This integration will primarily impact the ERPNext app and the payments app within the ERPNext framework.

Changes related to the standard POS will be made and pushed to the ERPNext repository.

Integration functionalities with the new doctypes will be implemented within the payments app to streamline M-Pesa payment processing.

Also, any relevant report related to mpesa payments will go in the payment app.

Conclusion

This proposal outlines the integration of M-Pesa payments into ERPNext’ s POS system, leveraging existing and new doctypes to streamline payment processing and reconciliation. The goal is to enhance ERPNext’ s functionality by providing an efficient and user-friendly payment solution for M-Pesa users.

Please review this proposal for the integration of M-Pesa C2B payments into ERPNext POS. This detailed plan aims to improve payment workflows and expand ERPNext’ s capabilities in the retail sector. We welcome feedback and collaboration to implement this feature effectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant