The meCash Mobile Money Collections API enables merchants to programmatically request payments from customers using mobile money wallets. This is ideal for funding your meCash wallet or collecting payments in local currencies like MWK, RWF, KES, and TZS.
1. Discover Supported Mobile Networks
Before requesting a payment, you should discover which mobile money networks are supported in the target country and currency by passing the country code.
Get Networks Endpoint
GET: {{baseURL}}/v1/mobileMoneyOperator
Query Parameters
| Field | Type | Description | Required |
|---|
country | string | ISO country code (e.g., MW, RW, KE, TZ). | β
Yes |
currency | string | ISO currency code (e.g., MWK, RWF, KES, TZS). | β
Yes |
This Endpoint is optional for Kenyan Mobile Money Collections.
curl --location '{{baseURL}}/v1/mobileMoneyOperator?country=MW¤cy=MWK' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY'
Sample Response
{
"message": "recipient mobile networks fetched successfully",
"status": "success",
"data": [
{
"name": "TNM Mpamba",
"country": "MW",
"code": "TNM Mpamba"
},
{
"name": "Airtel Money",
"country": "MW",
"code": "Airtel Money"
}
]
}
2. Request a Payment (Initiate Collection)
Once you have the network details, you can initiate a collection request. This will trigger a prompt on the customerβs mobile device to authorize the payment.
Initiate Collection Endpoint
POST: {{baseURL}}/v1/funding
Request Body Breakdown
| Field | Type | Description | Required |
|---|
currency | string | ISO currency code. | β
Yes |
country | string | ISO country code. | β
Yes |
amount | number | The total amount to collect. | β
Yes |
paymentMethod | string | Must be MOBILE_MONEY. | β
Yes |
mobile | object | Container for mobile-specific details. | β
Yes |
mobile.number | string | The customer phone number (with country code). | β
Yes |
mobile.provider | string | The name/code of the mobile money network. | β
Yes |
curl --location '{{baseURL}}/v1/funding' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{
"currency":"MWK",
"country":"MW",
"amount": 100.00,
"mobile": {
"number": "+265123456789",
"provider": "Airtel Money"
},
"paymentMethod": "MOBILE_MONEY"
}'
Sample Response
{
"message": "fund transaction initiated successfully",
"status": "success",
"data": {
"referenceNumber": "Q1PEGKO4QFRRR",
"uniqueReference": "ad33948f-68fd-4279-8d5c-651f43ec294a",
"transactionId": "be6a81e7-59f3-406b-9d92-a615e8ccfb4c",
"paymentMethod": "MOBILE_MONEY",
"amount": 100.00
}
}
3. Webhook Lifecycle Events
Mobile money collections are asynchronous. You should listen for the following webhook events (detailed in the Collection Webhook guide) to track the payment lifecycle:
| Event | Description |
|---|
collection.initiated | The collection request has been sent to the provider. |
collection.processing | The customer has been prompted and we are awaiting authorization. |
collection.completed | The payment was successful and funds have been added to your wallet. |
collection.failed | The payment was rejected or timed out. |
Ensure your webhook URL is correctly configured and verified to receive these notifications.