curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/transactions/wallet/mobile-money-cashout/ \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"wallet_id": "wall_789xyz...",
"amount": 50.00,
"phone_number": "+23278XXXXXX",
"provider": "m17"
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
payout = client.payouts.mobile_money(
wallet_id="wall_789xyz...",
amount=50.00,
phone_number="+23278XXXXXX",
provider="m17", # m17 = Orange Money, m18 = Africell Money
)
print(payout["id"], payout["status"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const payout = await client.payouts.mobileMoney({
walletId: "wall_789xyz...",
amount: 50.0,
phoneNumber: "+23278XXXXXX",
provider: "m17", // m17 = Orange Money, m18 = Africell Money
});
console.log(payout.id, payout.status);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hpay-api.host-sl.com/api/v1/transactions/wallet/mobile-money-cashout/",
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([
'wallet_id' => 'wall_789xyz...',
'amount' => 50,
'phone_number' => '+23278XXXXXX',
'provider' => 'm17'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: YOUR_API_KEY",
"secret-key: YOUR_SECRET_KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"id": "trans_123abc...",
"wallet_id": "wall_789xyz...",
"amount": 50.0,
"currency": "SLE",
"transaction_type": "withdrawal",
"payment_method": "mobile_money",
"status": "pending",
"monime_fee": 1.5,
"application_fee": 1.0,
"description": "Wallet withdrawal to +23278XXXXXX",
"created_at": "2025-01-16T10:10:00Z"
}
{
"detail": "Insufficient funds for withdrawal and fees"
}
{
"detail": "Missing or invalid API keys"
}
{
"detail": "Transaction failed: Wallet is disabled"
}
{
"detail": "Wallet not found"
}
Transactions
Mobile Money Cashout
Withdraw funds from a wallet to a mobile money account (Monime).
POST
/
api
/
v1
/
transactions
/
wallet
/
mobile-money-cashout
/
curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/transactions/wallet/mobile-money-cashout/ \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"wallet_id": "wall_789xyz...",
"amount": 50.00,
"phone_number": "+23278XXXXXX",
"provider": "m17"
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
payout = client.payouts.mobile_money(
wallet_id="wall_789xyz...",
amount=50.00,
phone_number="+23278XXXXXX",
provider="m17", # m17 = Orange Money, m18 = Africell Money
)
print(payout["id"], payout["status"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const payout = await client.payouts.mobileMoney({
walletId: "wall_789xyz...",
amount: 50.0,
phoneNumber: "+23278XXXXXX",
provider: "m17", // m17 = Orange Money, m18 = Africell Money
});
console.log(payout.id, payout.status);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hpay-api.host-sl.com/api/v1/transactions/wallet/mobile-money-cashout/",
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([
'wallet_id' => 'wall_789xyz...',
'amount' => 50,
'phone_number' => '+23278XXXXXX',
'provider' => 'm17'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: YOUR_API_KEY",
"secret-key: YOUR_SECRET_KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"id": "trans_123abc...",
"wallet_id": "wall_789xyz...",
"amount": 50.0,
"currency": "SLE",
"transaction_type": "withdrawal",
"payment_method": "mobile_money",
"status": "pending",
"monime_fee": 1.5,
"application_fee": 1.0,
"description": "Wallet withdrawal to +23278XXXXXX",
"created_at": "2025-01-16T10:10:00Z"
}
{
"detail": "Insufficient funds for withdrawal and fees"
}
{
"detail": "Missing or invalid API keys"
}
{
"detail": "Transaction failed: Wallet is disabled"
}
{
"detail": "Wallet not found"
}
This endpoint allows users to withdraw funds from their wallet directly to a mobile money account (Orange Money or Africell Money) in Sierra Leone.
Request Body
string
required
The unique identifier of the wallet to withdraw funds from.
number
required
The amount to withdraw in SLE (e.g., 50.50 for 50.50 SLE).
string
required
The recipient’s mobile money phone number in E.164 format (e.g.,
+23278XXXXXX).string
The mobile money provider code:
m17: Orange Money (default)m18: Africell Money
string
The currency code. Currently, only “SLE” is supported for mobile money cashouts.
Response
string
The unique identifier for the transaction.
string
The ID of the wallet the funds were withdrawn from.
number
The net amount being sent to the mobile money account.
string
The currency code (“SLE”).
string
The current status of the transaction (e.g., “pending”, “completed”, “failed”).
number
The fee charged by Monime for the cashout.
number
The platform fee collected for this withdrawal.
{
"id": "trans_123abc...",
"wallet_id": "wall_789xyz...",
"amount": 50.0,
"currency": "SLE",
"transaction_type": "withdrawal",
"payment_method": "mobile_money",
"status": "pending",
"monime_fee": 1.5,
"application_fee": 1.0,
"description": "Wallet withdrawal to +23278XXXXXX",
"created_at": "2025-01-16T10:10:00Z"
}
{
"detail": "Insufficient funds for withdrawal and fees"
}
{
"detail": "Missing or invalid API keys"
}
{
"detail": "Transaction failed: Wallet is disabled"
}
{
"detail": "Wallet not found"
}
curl --request POST \
--url https://hpay-api.host-sl.com/api/v1/transactions/wallet/mobile-money-cashout/ \
--header 'api-key: YOUR_API_KEY' \
--header 'secret-key: YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"wallet_id": "wall_789xyz...",
"amount": 50.00,
"phone_number": "+23278XXXXXX",
"provider": "m17"
}'
from hostpay import HostPay
client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")
payout = client.payouts.mobile_money(
wallet_id="wall_789xyz...",
amount=50.00,
phone_number="+23278XXXXXX",
provider="m17", # m17 = Orange Money, m18 = Africell Money
)
print(payout["id"], payout["status"])
import { HostPay } from "@hostpay/sdk";
const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });
const payout = await client.payouts.mobileMoney({
walletId: "wall_789xyz...",
amount: 50.0,
phoneNumber: "+23278XXXXXX",
provider: "m17", // m17 = Orange Money, m18 = Africell Money
});
console.log(payout.id, payout.status);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://hpay-api.host-sl.com/api/v1/transactions/wallet/mobile-money-cashout/",
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([
'wallet_id' => 'wall_789xyz...',
'amount' => 50,
'phone_number' => '+23278XXXXXX',
'provider' => 'm17'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"api-key: YOUR_API_KEY",
"secret-key: YOUR_SECRET_KEY"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}