Initiate PayOut
curl --request POST \
--url https://sandbox.getmipay.com/api/payouts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'operation: <operation>' \
--header 'service: <service>' \
--data '
{
"amount": 5000,
"currency": "XAF",
"wallet": "237690000000",
"description": "Refund for Order #456",
"customer_name": "Jane Smith"
}
'import requests
url = "https://sandbox.getmipay.com/api/payouts"
payload = {
"amount": 5000,
"currency": "XAF",
"wallet": "237690000000",
"description": "Refund for Order #456",
"customer_name": "Jane Smith"
}
headers = {
"operation": "<operation>",
"service": "<service>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
operation: '<operation>',
service: '<service>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 5000,
currency: 'XAF',
wallet: '237690000000',
description: 'Refund for Order #456',
customer_name: 'Jane Smith'
})
};
fetch('https://sandbox.getmipay.com/api/payouts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.getmipay.com/api/payouts",
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([
'amount' => 5000,
'currency' => 'XAF',
'wallet' => '237690000000',
'description' => 'Refund for Order #456',
'customer_name' => 'Jane Smith'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"operation: <operation>",
"service: <service>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.getmipay.com/api/payouts"
payload := strings.NewReader("{\n \"amount\": 5000,\n \"currency\": \"XAF\",\n \"wallet\": \"237690000000\",\n \"description\": \"Refund for Order #456\",\n \"customer_name\": \"Jane Smith\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("operation", "<operation>")
req.Header.Add("service", "<service>")
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://sandbox.getmipay.com/api/payouts")
.header("operation", "<operation>")
.header("service", "<service>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 5000,\n \"currency\": \"XAF\",\n \"wallet\": \"237690000000\",\n \"description\": \"Refund for Order #456\",\n \"customer_name\": \"Jane Smith\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.getmipay.com/api/payouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["operation"] = '<operation>'
request["service"] = '<service>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 5000,\n \"currency\": \"XAF\",\n \"wallet\": \"237690000000\",\n \"description\": \"Refund for Order #456\",\n \"customer_name\": \"Jane Smith\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Payout initiated successfully",
"data": {
"transaction_reference": "MPAYOUT_XYZ789GHI123",
"soleaspay_reference": "MLS690d472dd7ee7C",
"amount": 5000,
"currency": "XAF",
"status": "pending"
}
}{
"success": false,
"message": "Invalid KEY",
"error_code": "INVALID_PUBLIC_KEY"
}{
"success": false,
"message": "Invalid KEY",
"error_code": "INVALID_PUBLIC_KEY"
}Payments
Disburse payment (Pay-out)
Send money to a customer via mobile money. Requires Authorization: Bearer <jwt>. Also send service and operation headers. The amount will be deducted from your merchant balance immediately.
POST
/
payouts
Initiate PayOut
curl --request POST \
--url https://sandbox.getmipay.com/api/payouts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'operation: <operation>' \
--header 'service: <service>' \
--data '
{
"amount": 5000,
"currency": "XAF",
"wallet": "237690000000",
"description": "Refund for Order #456",
"customer_name": "Jane Smith"
}
'import requests
url = "https://sandbox.getmipay.com/api/payouts"
payload = {
"amount": 5000,
"currency": "XAF",
"wallet": "237690000000",
"description": "Refund for Order #456",
"customer_name": "Jane Smith"
}
headers = {
"operation": "<operation>",
"service": "<service>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
operation: '<operation>',
service: '<service>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 5000,
currency: 'XAF',
wallet: '237690000000',
description: 'Refund for Order #456',
customer_name: 'Jane Smith'
})
};
fetch('https://sandbox.getmipay.com/api/payouts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.getmipay.com/api/payouts",
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([
'amount' => 5000,
'currency' => 'XAF',
'wallet' => '237690000000',
'description' => 'Refund for Order #456',
'customer_name' => 'Jane Smith'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"operation: <operation>",
"service: <service>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.getmipay.com/api/payouts"
payload := strings.NewReader("{\n \"amount\": 5000,\n \"currency\": \"XAF\",\n \"wallet\": \"237690000000\",\n \"description\": \"Refund for Order #456\",\n \"customer_name\": \"Jane Smith\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("operation", "<operation>")
req.Header.Add("service", "<service>")
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://sandbox.getmipay.com/api/payouts")
.header("operation", "<operation>")
.header("service", "<service>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 5000,\n \"currency\": \"XAF\",\n \"wallet\": \"237690000000\",\n \"description\": \"Refund for Order #456\",\n \"customer_name\": \"Jane Smith\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.getmipay.com/api/payouts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["operation"] = '<operation>'
request["service"] = '<service>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 5000,\n \"currency\": \"XAF\",\n \"wallet\": \"237690000000\",\n \"description\": \"Refund for Order #456\",\n \"customer_name\": \"Jane Smith\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Payout initiated successfully",
"data": {
"transaction_reference": "MPAYOUT_XYZ789GHI123",
"soleaspay_reference": "MLS690d472dd7ee7C",
"amount": 5000,
"currency": "XAF",
"status": "pending"
}
}{
"success": false,
"message": "Invalid KEY",
"error_code": "INVALID_PUBLIC_KEY"
}{
"success": false,
"message": "Invalid KEY",
"error_code": "INVALID_PUBLIC_KEY"
}Authorizations
JWT bearer token returned by POST /action/auth. Send protected requests with: Authorization: Bearer . Tokens expire after 24 hours.
Headers
Operation type - must be '4' for PayOut
Available options:
4 Example:
"4"
Service identifier for the payment method
Example:
"1"
Body
application/json
Payout details to send to customer
Required range:
x >= 100Example:
5000
Available options:
XAF, USD, EUR Example:
"XAF"
Example:
"237690000000"
Maximum string length:
255Example:
"Refund for Order #456"
Maximum string length:
255Example:
"Jane Smith"
⌘I
