Commerce Mpesa

This module helps drupal commerce merchants accept M-Pesa payments.


This module is not yet published on so you have the option of getting the development version from or as a download from Github.

Install it as you would any other Drupal module.

  • Drupal Commerce

The configuration options for this module follows the standard procedure for the Drupal Commerce payment modules.

Commerce Mpesa Config

The following options are available;

  • Kopokopo Secret: The api secret from Kopokopo. This is available from the API settings on kopokopo.
  • Paybill Number: The paybill/till number that is receiving the payments
  • Mpesa Provider: At the moment only till numbers obtained from Kopokopo are supported
Kopokopo Configuration

Some config changes will need to be made on the Kopokopo API.Kopokopo needs to be aware of the URL that it will send data to. This module relies on the PUSH api provided by Kopokopo.

On your kopokopo account you need to get to the 'Api settings' page.

We only need to provide the callback url and leave the rest as is. Your callback url should be in the pattern of ''

Kopokopo API

That's it,you are ready to receive payments.


  • Release on
  • Better documentation
  • Support transactions from MPESA directly
Commerce Mpesa
This drupal module allows merchants to receive mpesa payments directlyon their websites