Skip to main content
POST
/
v1
/
funding
Initiate Collection
const options = {
  method: 'POST',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    currency: 'MWK',
    country: 'MW',
    amount: 100,
    mobile: {number: '+265123456789', provider: 'Airtel Money'},
    paymentMethod: 'MOBILE_MONEY'
  })
};

fetch('https://sandboxapi.me-cash.com/v1/funding', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
curl --request POST \
--url https://sandboxapi.me-cash.com/v1/funding \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"currency": "MWK",
"country": "MW",
"amount": 100,
"mobile": {
"number": "+265123456789",
"provider": "Airtel Money"
},
"paymentMethod": "MOBILE_MONEY"
}
'
import requests

url = "https://sandboxapi.me-cash.com/v1/funding"

payload = {
"currency": "MWK",
"country": "MW",
"amount": 100,
"mobile": {
"number": "+265123456789",
"provider": "Airtel Money"
},
"paymentMethod": "MOBILE_MONEY"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const url = 'https://sandboxapi.me-cash.com/v1/funding';
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
currency: 'MWK',
country: 'MW',
amount: 100,
mobile: {number: '+265123456789', provider: 'Airtel Money'},
paymentMethod: 'MOBILE_MONEY'
})
};

fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sandboxapi.me-cash.com/v1/funding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'currency' => 'MWK',
'country' => 'MW',
'amount' => 100,
'mobile' => [
'number' => '+265123456789',
'provider' => 'Airtel Money'
],
'paymentMethod' => 'MOBILE_MONEY'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.post("https://sandboxapi.me-cash.com/v1/funding")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"currency\": \"MWK\",\n \"country\": \"MW\",\n \"amount\": 100,\n \"mobile\": {\n \"number\": \"+265123456789\",\n \"provider\": \"Airtel Money\"\n },\n \"paymentMethod\": \"MOBILE_MONEY\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandboxapi.me-cash.com/v1/funding")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"currency\": \"MWK\",\n \"country\": \"MW\",\n \"amount\": 100,\n \"mobile\": {\n \"number\": \"+265123456789\",\n \"provider\": \"Airtel Money\"\n },\n \"paymentMethod\": \"MOBILE_MONEY\"\n}"

response = http.request(request)
puts response.read_body
import Foundation

let parameters = [
"currency": "MWK",
"country": "MW",
"amount": 100,
"mobile": [
"number": "+265123456789",
"provider": "Airtel Money"
],
"paymentMethod": "MOBILE_MONEY"
] as [String : Any?]

let postData = try JSONSerialization.data(withJSONObject: parameters, options: [])

let url = URL(string: "https://sandboxapi.me-cash.com/v1/funding")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.timeoutInterval = 10
request.allHTTPHeaderFields = [
"x-api-key": "<api-key>",
"Content-Type": "application/json"
]
request.httpBody = postData

let (data, _) = try await URLSession.shared.data(for: request)
print(String(decoding: data, as: UTF8.self))
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"currency\": \"MWK\",\n \"country\": \"MW\",\n \"amount\": 100,\n \"mobile\": {\n \"number\": \"+265123456789\",\n \"provider\": \"Airtel Money\"\n },\n \"paymentMethod\": \"MOBILE_MONEY\"\n}")
val request = Request.Builder()
.url("https://sandboxapi.me-cash.com/v1/funding")
.post(body)
.addHeader("x-api-key", "<api-key>")
.addHeader("Content-Type", "application/json")
.build()

val response = client.newCall(request).execute()
false
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://sandboxapi.me-cash.com/v1/funding"

payload := strings.NewReader("{\n \"currency\": \"MWK\",\n \"country\": \"MW\",\n \"amount\": 100,\n \"mobile\": {\n \"number\": \"+265123456789\",\n \"provider\": \"Airtel Money\"\n },\n \"paymentMethod\": \"MOBILE_MONEY\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "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
  }
}

Authorizations

x-api-key
string
header
required

Body

application/json
currency
string
required

Currency code (e.g., MWK, RWF, KES).

Example:

"MWK"

country
string
required

Country code (e.g., MW, RW, KE).

Example:

"MW"

amount
number
required
Example:

100

mobile
object
required
paymentMethod
enum<string>
required
Available options:
MOBILE_MONEY
Example:

"MOBILE_MONEY"

Response

200 - application/json

Funding transaction initiated successfully.

status
string
required
Example:

"success"

message
string
required
Example:

"Operation completed successfully."

data
object

The payload of the successful response.