Payment Plugins

WHMCS - Mpesa API Integration

WHMCS Mpesa API integration is something we have done for several clients and we can still do it for your Webhosting website now. All you need is to download our WHMCS mpesa API plugin which is a complete solution to adding Mpesa mobile payment gateway in your WHMCS website. You want to sell hosting, domain names, ssl certificates, website builder packages using the popular WHMCS platform?, If yes, all you need is to contact us for this service. In this article, I will explain exactly what you need to have and the step by step documentation of how our WHMCS payment plugin looks like and works.

Requirements to Integrate Mpesa API on a WHMCS website

  1. Whmcs valid License and an installed WHMCS website.
  2. Mpesa paybill number or Till Number.
  3. Daraja portal account.
  4. A developer to do the work (This is where we come in as developers to write the code for you to integrate Mpesa API or Install and setup our custom developed Payment module).

You can easily get an Mpesa API integration solution on your WHMCS WEBSITE to automate your Domain and hosting Mpesa payments. Simply contact me on + 254706745202 now for a good price and quality clean Mpesa Integration work.

How will the Mpesa API Integrated WHMCS website look on the checkout process, payment and order processing.

Below is a step by step illustration of how the final Mpesa Integration solution will look like.

  1. Step 1: The customer will land on your WHMCS website, search for a domain name or hosting package, add to cart and proceed to make a payment. When making a payment, that is where the first instance of Lipa na Mpesa payment gateway will appear.

Add Mpesa payment gateway to WHMCS WEBSITES

Fig 1: An illustration of Lipa na Mpesa integrated as one of the Payment methods on a WHMCS website. Here, the customer will select Lipa na Mpesa and click Proceed to Checkout.

The customer will then be redirected to the Mpesa API in the background.

Lipa na Mpesa payment gateway Redirecting to make payment

 Fig 2: The above is an illustration of how the customer will see the redirection happening.

 
The customer will finally end up on a page that displays a message on what exactly happened during the Mpesa API checks of the required integration variables like Phone, amount and the Daraja portal credentials.

 

 STK PUSH message after a successful stk push api request

 Fig 3: This screenshot shows the page the customer sees after successful request. The message is that the customer should check his or her Mpesa phone and enter Pin to complete the transaction.

 

On checking the Mpesa phone, there will be a popup message which is as a result of stk push Mpesa api integration (Mpesa Express API on Daraja).

WHMCS stk push popup on client Mpesa phone

Fig 4: shows the stk push pop up message as it will appear on clients phone. The client will simply enter Mpesa PIN to complete the transaction. As easy as that.

The next that the customer will see is the a successfully paid up WHMCS invoice. That means Mpesa API is updating Invoices automatically when a successful payment hits the merchant Paybill or Till Number.

WHMCS invoices paid via Lipa na Mpesa payment gateway

Fig 5: Then Invoices will be marked as paid automatically and WHMCS system will detect it is paid and actually send a Payment Confirmation email to the customer registered email. This happens even if the customer hasn't reloaded the Order page or has not clicked the button to be redirected.

A nice idea in development is an auto-redirection to the customer invoices with a Payment successful page in consideration when payment hits the merchant account.

 

An individual WHMCS invoice paid via Mpesa

Fig 6: Look at the paid Invoice above which is automatically updated as soon as Mpesa payment hits the business Paybill number.