MENU Navbar
javascript php python
  • Welcome
  • General First Steps
  • Usage
  • Welcome

    Mazzuma provides easy to use interfaces for connecting your web application or mobile application to the service. This allow you to gain mobile money payments from customers and clients with optimal ease and at no extra charges (standard mobile money operator charges apply).

    General First Steps

    In order to start using Mazzuma to receive payments, you would have to register to use the service. Head over to the dashboard and create a new Mazzuma account. You would enter the mobile money account you would wish payments to be made to during the registration process. Once registered, log into your account. You would have an API key generated, which you can view in the API section. This API Key should be noted, as it would authorise payments to your account, as well as direct incoming funds to your mobile money account.

    Additionally, you must fill out our verification form , as a mandatory check against fraudulent activities.


    Websites and Applications

    Sample Payload

      "price": 1,
      "network": "mtn",
      "recipient_number": "026xxxxxxx",
      "sender": "024xxxxxxx",
      "option": "rmta",
      "apikey": "",
      "orderID": ""

    Sample Request

      var xhr = new XMLHttpRequest();"POST", '', true);
      //Send the proper header information along with the request
      xhr.setRequestHeader("Content-type", "application/json");
      xhr.onreadystatechange = function() {
        //Call a function when the state changes.
          if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
              // Request finished. Do processing here.
      //Replace requestPayload with the payload you would be sending
    $url = '';
    $additional_headers = array(
       'Content-Type: application/json'
    $data = array(
      "price"=> 1,
      "network"=> "mtn",
      "recipient_number"=> "026xxxxxxx",
      "sender"=> "024xxxxxxx",
      "option"=> "rmta",
      "apikey"=> ""
    $data = json_encode($data);
    $ch = curl_init($url);                                                                      
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
    curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // $data is the request payload in JSON format                                                                 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      
    curl_setopt($ch, CURLOPT_HTTPHEADER, $additional_headers); 
    $server_output = curl_exec ($ch);
    # Note this sample is functional for python 3 only. 
    # It also makes use of the requests library, available at
    import requests 
    url= ''
    payload =  # the payload object for the request
    response =, data=payload)

    Making a payment request







    Key Description
    price The amount to be paid
    network This is the network of the mobile money account that would be making the payment (your customer).
    recipient_number This is the mobile money account the payments shall end up in. (your account).
    sender This is the mobile money account that would be making the payment (your customers).
    option This denotes the direction of cash flow. For example, rmta can be understood as an acronym of the phrase ‘receive mtn to airtel’, which means you would be receiving money to your Airtel account (the recipient number) from an MTN number(the sender). This format would hold for all transaction requests sent to the API. Do not forget to append the r at beginning.
    apikey The API key generated when you created the Mazzuma Business account. This can be accessed or changed via the web dashboard.
    orderID This optional parameter can be added to track the status of a transaction after it has been completed by use of our check status endpoint. Please note that the order ID is not the same as the transaction ID returned after a transaction request.
    token This is the token generated by Vodafone users in order to complete mobile money payments. This parameter is only required when the payment is to be made by a Vodafone user.


    Sample Response


    Sending the request would bring up a confirmation and payment prompt on the mobile phone, after which the request would return a response. The request to the API would wait until the payment succeeds or fails, and return a JSON response.

    The status denotes whether the transaction was successful or failed, and the id is the transaction ID.

    In the event of a wrong request being sent, you would receive a response of Sorry Bro :(

    In the event of the transaction failing, the request would terminate with an empty response.

    Network Considerations

    1. Dial *170#
    2. Select option 10) Wallet
    3. Select 3) My Approvals
    4. Enter Mobile Money PIN
    5. Select the transaction from the list
    6. Confirm the transaction.

    Checking a Transaction Status

    Sample Status Check Responses


    If at any time you wish to check the status of a transaction, you can send a GET request to<id> , with the orderID parameter set to the order ID you sent with the initial transaction request.

    Wordpress Sites

    For WordPress websites which utilise the WooCommerce e-commerce plugin, Mazzuma offers an easy to use plugin that integrates the Mazzuma payment option into the website. Kindly note that you should have completed our general first steps, including filling out our verification form before use of the plugin.

    1. Ensure that the WooCommerce plug-in in already installed and properly set-up on your website.
    2. In your WordPress admin dashboard, search for the 'WooCommerce Mazzuma Payment Gateway' and install the plugin.
    3. Once installed, activate the plugin.
    4. Still in the WordPress admin dashboard, go to the WooCommerce plugin settings, and the Checkout tab.
    5. If the plugin correctly installed, there should be a Mazzuma payment option among the payment gateways listed at the bottom of the page. However, it would not be enabled.
    6. Select the Mazzuma gateway, and you would be taken to the plugin configuration page.
    7. Here, first enable the plugin, and then add the API key generated from the dashboard. Please note payments would not work without this API key. Once done, hit save.
    8. Mazzuma should now be listed as an enabled payment gateway, and your customers would see the option to pay using Mazzuma at checkout pages on your site. Clicking that option should redirect them to the payment page
    9. Once payment is done on the payment page, you would probably want users to be directed to your site. The payment page automatically redirects the user to the URL supplied as the success_url so you might want to use your site URL for that.