ZMW Mobile money

Follow these steps to accept payment using our mobile money API:

  • Initiate the Payment

  • Validate the OTP

Initiate the Payment

POST {{env_url}}/pay/aggregators/{{gateway}}/mobilemoney/v3

You would need to pass, as header the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.

Headers

Request Body (encrypted)

Encryption algorithm here

{
    "message": "encrypted-body"
}

Request Body (plain)

{
   "fullname": "Francisca Reuben",
   "email": "fran@matrix.io",
   "phone_number": "0961111111",
   "tx_ref": "test_momo_2908_13209",
   "network": "mtn", //required, must be mtn or airtel
   "description": "payment for airpod",
   "country": "ZM",
   "amount": "10",
   "currency": "ZMW",
   "rate": 1,
   "paymentType": "woo",
   "sourceCurrency": "ZMW",
   "sourceAmount": 1,
   "rememberMe": false,
   "option": "mpesa"
}

Response

{
    "message": "success",
    "error": null,
    "data": {
        "message": "success",
        "error": null,
        "data": {
            "amount": "10.00",
            "charged_amount": "10.00",
            "currency": "ZMW",
            "message": "Please enter otp",
            "status": "pending",
            "customer": {
                "country": "zm",
                "phone": "0961111111",
                "operator": "mtn",
                "accountName": "Francisca Reuben",
                "name": "Francisca Reuben",
                "phone_number": "0961111111"
            }
        }
    }
}

Validate OTP

POST {{env_url}}/pay/aggregators/{{gateway}}/mobilemoney/v3

The customer will need to enter the OTP sent to their provided phone number when the payment is initiated.

You would need to pass, as header the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.

Headers

Request Body (encrypted)

{
    "message": "encrypted-body"
}

Request Body (plain)

{
    "tx_ref": "test_momo_2908_13209",
    "otp": "000000"
}

Response

{
    "message": "success",
    "error": null,
    "data": {
        "message": "success",
        "error": null,
        "data": {
            "amount": "10.00",
            "charged_amount": "10.00",
            "currency": "ZMW",
            "message": "Transaction in progress",
            "status": "pending",
            "customer": {
                "country": "zm",
                "phone": "0961111111",
                "operator": "mtn",
                "accountName": "Francisca Reuben",
                "name": "Francisca Reuben",
                "phone_number": "0961111111"
            }
        }
    }
}

Last updated