M-Pesa Integration

M-Pesa Integration

The processing of transactions via M-payment Pesa's gateway is made possible by M-Pesa integration.

ERPNext and the M-Pesa application can process payments more easily thanks to M-Pesa Integration. Just the POS is compatible with M-Pesa Integration in order to enable payments for the same. The shopping cart is not compatible with this function.

To set up M-Pesa, go to:

Integrations > Payments > M-Pesa Settings

1.How to get your M-Pesa credentials?

  1. You must sign into your M-Pesa account in order to activate your API credentials.
  2. After that, open the Go Live section of the app and follow the instructions to have the app approved.
  3. You must submit the document and follow the instructions to obtain the final credentials for your application once all test cases have been satisfied and expected outcomes have matched the actual results.
  4. The credentials that you should use in M-Pesa Settings are those that are listed in the Production URL and Credentials section.

2.Setting up M-Pesa

You must set up all the required parameters that you have received from M-Pesa in order to enable M-Pesa Express. If you want to use the integration's staging environment, you can choose the option for staging and log in with the M-Pesa staging credentials by making a separate application.

As shown in the following screenshot, the system will produce a Payment Gateway record and an Account head in the Chart of Accounts when the M-Pesa interface is enabled in ERPNext. The Account type will be Bank.

Along with creating certain custom fields in the POS Settings to manage the POS payments, it will also create a Mode of Payment with the same name and account as the payment gateway's.

You will be able to take online payments through M-Pesa once you have configured the Payment Gateway Account.

3. M-Pesa POS Payments

The POS checkout would display an additional information section after configuring the POS profile with the M-Pesa method of payment. This section comprises two fields that were automatically set-up on adding M-Pesa settings.

A POS user can start a request for payment from the consumer as soon as they enter their mobile number. The customer's M-Pesa mobile application, which is connected to the given mobile number, receives a request. A confirmation box appears after the user processes the payment, asking them to submit it.

4. M-Pesa Account Balance

The Get Account Balance button can be used to retrieve the account balance associated with a specific M-Pesa. The M-Pesa account balance information will then load in the dashboard.

5. Supporting transaction currencies

Only companies using KSH (Kenyan Shilling) as their company currency can use M-Pesa.