Skip to content

Mobile Money Disbursement

Description

This endpoint is used to initiate a mobile money disbursement.

Headers

The following headers should be added to your request.

HeaderTypeDescriptionRequired
acceptapplication/jsonExpected response formatYes
Content-Typeapplication/jsonContent type of the request bodyYes
x-api-keystringYour Lipila API keyYes
callbackUrlstringURL to receive asynchronous callback notificationsoptional

Request Body

FieldTypeDescriptionRequired
referenceIdstringUnique reference identifier for the transaction.Yes
amountnumberAmount to disburseYes
accountNumberstringMobile money account number to disburse toYes
currencystringCurrency code (e.g., ZMW)Yes
narrationstringDescription or note about the transactionOptional

Example Request

js

curl -X 'POST' \
  'https://api.lipila.dev/api/v1/disbursements/mobile-money' \
  -H 'accept: application/json' \
  -H 'callbackUrl: https://lipila.io/callback' \
  -H 'x-api-key: Your_secret_key' \
  -H 'Content-Type: application/json' \
  -d '{
  "referenceId": "b05bad241fd1", // Use this Id to check the transaction status
  "amount": 1,
  "narration": "test",
  "accountNumber": "260xxxxxxxxxx",
  "currency": "ZMW"
}'

Example Successful Response

Below is a successful response from the above request. This successful response indicates that a disbursement has been created successfully.

HTTP Status CodeDescription
200SUCCESS
js

{
  "amount": 1,
  "externalId": null,
  "narration": "test",
  "ipAddress": "::1",
  "referenceId": "a9a2",
  "status": "Pending",
  "currency": "ZMW",
  "type": "Disbursement",
  "accountNumber": "260xxxxxxxxxx",
  "paymentType": "MtnMoney",
  "createdAt": "2025-10-01T13:05:37.869722+00:00",
  "identifier": "LPLXC-20251001-6965"
}

Error Codes

The following are the expected error responses from the api.

HTTP Status CodeError CodeDescription
400BAD REQUESTMissing or invalid request parameters
401UNAUTHORIZEDMissing or invalid API authentication
403FORBIDDENAccess denied to this resource
429TOO MANY REQUESTSRate limit exceeded, slow down requests

Example Failed Response

Here is what to expect when your transaction fails. Below are examples of failed transaction response. The message property is used here to describe the failure reason of a transaction.

MTN

js
{
  "referenceId": "f9b3b3b248c5",
  "currency": "ZMW",
  "amount": 0.5,
  "accountNumber": "260xxxxxxxxxx",
  "status": "Failed",
  "paymentType": "MtnMoney",
  "type": "Disbursement",
  "ipAddress": "::ffff:10.109.2.19",
  "identifier": "LPLXC-20250910-3083",
  "message": "Failed to send status check to Mtn httpStatusCode=404"
}

AIRTEL

js
{
  "referenceId": "fff0c44dd15d",
  "currency": "ZMW",
  "amount": 1,
  "accountNumber": "260xxxxxxxxxx",
  "status": "Failed",
  "paymentType": "AirtelMoney",
  "type": "Disbursement",
  "ipAddress": "::1",
  "identifier": "LPLTXNDAM-20250827125439",
  "message": "Transaction is not found"
}

ZAMTEL

js
{
  "referenceId": "a8b8fb376832",
  "currency": "ZMW",
  "amount": 1,
  "accountNumber": "260xxxxxxxxxx",
  "status": "Failed",
  "paymentType": "ZamtelKwacha",
  "type": "Disbursement",
  "ipAddress": "::ffff:10.109.2.19",
  "identifier": "LPLTXNCZK-20250821144612",
  "message": "System internal error."
}

Released under the MIT License.