Mobile Money

Mobile Money Payments Integration

In response to the growing demand for mobile money payment solutions among merchants in the region, our platform offers comprehensive guidance on integrating mobile money payments into e-commerce websites. This section serves as your roadmap to seamlessly incorporate mobile money payment functionality into your online business operations. By integrating mobile money payment options, merchants can cater to a wider audience, tap into new market segments, and enhance the overall customer experience.

Guided Integration Process

Our documentation provides a step-by-step guide to assist merchants in effortlessly integrating mobile money payments into their e-commerce platforms. From initial setup to testing and deployment, we offer comprehensive instructions and best practices to ensure a smooth and successful integration process.

Key Features and Benefits

  • Expanded Customer Reach: Reach customers who prefer mobile money payment methods, enhancing accessibility and convenience for a diverse customer base.

  • Secure Transactions: Benefit from our secure payment infrastructure, ensuring the confidentiality and integrity of all mobile money transactions.

  • Enhanced User Experience: Provide a seamless payment experience for your customers, fostering trust and loyalty through convenient payment options.

API

Request URL

{{base_url}}/api/create-order

Request

FieldDescriptionTypeField
codeType of payment request. 101 for Mobile Push and 102 for Card Payments.intRequired
merchant_order_idUnique identifier for the merchant's order.stringRequired
amountTotal amount of the transaction in the specified currency. Minimum is 1000 TZSintRequired
currencyCurrency code for the transaction (e.g., TZS for Tanzanian Shilling).stringRequired
merchant_cancel_urlURL to redirect the customer to in case of cancellation (not used). start with httpsvalid url stringOptional
merchant_redirect_urlURL to redirect the customer to upon successful payment (not used). start with httpsvalid url stringOptional
metadataAdditional metadata associated with the transaction, provided as key-value pairs.JsonOptional
merchant_webhookURL of the web-hook endpoint on the merchant's server to receive transaction updates. (mandatory)valid url stringRequired
product_countNumber of products included in the transaction.intRequired
customer_emailEmail address of the customer making the payment.valid email stringRequired
customer_nameName of the customer making the payment.stringRequired
customer_phonePhone number of the customer making the payment.stringRequired
customer_useridUnique identifier for the customer within the merchant's system.string/int maxLength =100Required
shouldFailIndicates whether the transaction should be processed and succeed or not values can be (true) or (false). default is false. This is only important when you set your environment to Playground in your Dashboard.boolOptional

Sending this request initiates a mobile money payment process, where the customer receives a PUSH notification and is prompted to provide their PIN for verification. Upon completion, transaction updates are sent to the provided webhook URL.

📘

Ensure that you provide a valid web-hook URL to enable communication with your server.

Sample Request

{
    "code": 101, // 101 For Mobile Payments
    "merchant_order_id": "5",
    "amount": 10000,
    "currency" : "TZS",
    "merchant_cancel_url": "https://www.yoursite.com/cancel", 
    "merchant_redirect_url": "https://www.yoursite.com/success", 
    "metadata": {
        "anykey": "anyvalue",
        "another_anyKey": "another_anyvalue"
    },
    "merchant_webhook": "https://webhook.site/#!/2250a4d1-a6e2-4ac8-97b2-26dda65da334", // mandatory
    "product_count": "1",
    "customer_email": "[email protected]", 
    "customer_name": "Johnny Mnemonic",  
    "customer_phone": "255789000111",
    "customer_userid": 2,
    "shouldFail" : false
}

Sample Response

Upon processing a payment request, the payment gateway generates a response indicating the status and outcome of the transaction. The response structure varies depending on whether the transaction was successful or failed.

Successful Payment Response

For successful payments, the response includes the following details:

  • Status : 203
  • Order ID: Identifier for the merchant's order.
  • Result: Indicates the status of the transaction (e.g., "dispatched").
  • Message: Confirmation message indicating that the payment was processed successfully.
  • Metadata: Additional metadata associated with the transaction.
{
  "order_id": "3",
  "status": 203,
  "result": "dispatched",
  "message": "Payment was processed successfully",
  "metadata": { "anykey": "anyvalue", "another_anyKey": "another_anyvalue" }
}

 

Failed Transaction

In case of a failed transaction, the response status code is set to 495. Details regarding the failure may be included in the response message.

🚧

Note: As the response is encrypted, ensure to decode it before processing the data. Refer to the provided decryption method in the documentation.

Summary

1
Merchant Sends Request
2
Gateway Processes the Request
3
Gateway Dispatches Push Request to Customer Phone
4
Customer Authorizes the Transaction
5
Gateway Sends Webhook to Merchant
6
Merchant Verifies the Transaction Status
7
Merchant Completes/Fails Transaction

👍

Important

After 30 minutes if the transaction is not completed, it will be automatically cancelled by the system.