Create a disbursement
curl --request POST \
--url https://api.sandpay.dev/v1/disbursements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 5000,
"currency": "XOF",
"country": "CI",
"msisdn": "+22507123456",
"application": "my-store",
"reference": "<string>",
"order_ref": "<string>",
"order_url": "<string>",
"is_url_protected": true,
"description": "Cashback reward"
}
'import requests
url = "https://api.sandpay.dev/v1/disbursements"
payload = {
"amount": 5000,
"currency": "XOF",
"country": "CI",
"msisdn": "+22507123456",
"application": "my-store",
"reference": "<string>",
"order_ref": "<string>",
"order_url": "<string>",
"is_url_protected": True,
"description": "Cashback reward"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 5000,
currency: 'XOF',
country: 'CI',
msisdn: '+22507123456',
application: 'my-store',
reference: '<string>',
order_ref: '<string>',
order_url: '<string>',
is_url_protected: true,
description: 'Cashback reward'
})
};
fetch('https://api.sandpay.dev/v1/disbursements', 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://api.sandpay.dev/v1/disbursements",
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' => 'XOF',
'country' => 'CI',
'msisdn' => '+22507123456',
'application' => 'my-store',
'reference' => '<string>',
'order_ref' => '<string>',
'order_url' => '<string>',
'is_url_protected' => true,
'description' => 'Cashback reward'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.sandpay.dev/v1/disbursements"
payload := strings.NewReader("{\n \"amount\": 5000,\n \"currency\": \"XOF\",\n \"country\": \"CI\",\n \"msisdn\": \"+22507123456\",\n \"application\": \"my-store\",\n \"reference\": \"<string>\",\n \"order_ref\": \"<string>\",\n \"order_url\": \"<string>\",\n \"is_url_protected\": true,\n \"description\": \"Cashback reward\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.sandpay.dev/v1/disbursements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 5000,\n \"currency\": \"XOF\",\n \"country\": \"CI\",\n \"msisdn\": \"+22507123456\",\n \"application\": \"my-store\",\n \"reference\": \"<string>\",\n \"order_ref\": \"<string>\",\n \"order_url\": \"<string>\",\n \"is_url_protected\": true,\n \"description\": \"Cashback reward\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandpay.dev/v1/disbursements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 5000,\n \"currency\": \"XOF\",\n \"country\": \"CI\",\n \"msisdn\": \"+22507123456\",\n \"application\": \"my-store\",\n \"reference\": \"<string>\",\n \"order_ref\": \"<string>\",\n \"order_url\": \"<string>\",\n \"is_url_protected\": true,\n \"description\": \"Cashback reward\"\n}"
response = http.request(request)
puts response.read_body{
"tx_id": "TX_DB7788AA",
"type": "disbursement",
"status": "SUCCESS",
"amount": 5000,
"merchant_balance_after": 123,
"recipient_balance_after": 123,
"idempotent": true
}{
"error": "quota_exceeded",
"message": "Monthly simulation quota exceeded.",
"detail": {}
}{
"error": "quota_exceeded",
"message": "Monthly simulation quota exceeded.",
"detail": {}
}{
"error": "quota_exceeded",
"message": "Monthly simulation quota exceeded.",
"detail": {}
}Référence API
Create a disbursement
Free-form payout (merchant → an msisdn), not linked to any prior
collection. Debits the merchant float, credits the recipient SIM. No
commission is taken. Emits a disbursement.completed webhook.
Disbursements are persisted as transactions with type=disbursement;
retrieve them via GET /v1/payments/{id} and list them with
GET /v1/payments?type=disbursement.
POST
/
v1
/
disbursements
Create a disbursement
curl --request POST \
--url https://api.sandpay.dev/v1/disbursements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 5000,
"currency": "XOF",
"country": "CI",
"msisdn": "+22507123456",
"application": "my-store",
"reference": "<string>",
"order_ref": "<string>",
"order_url": "<string>",
"is_url_protected": true,
"description": "Cashback reward"
}
'import requests
url = "https://api.sandpay.dev/v1/disbursements"
payload = {
"amount": 5000,
"currency": "XOF",
"country": "CI",
"msisdn": "+22507123456",
"application": "my-store",
"reference": "<string>",
"order_ref": "<string>",
"order_url": "<string>",
"is_url_protected": True,
"description": "Cashback reward"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 5000,
currency: 'XOF',
country: 'CI',
msisdn: '+22507123456',
application: 'my-store',
reference: '<string>',
order_ref: '<string>',
order_url: '<string>',
is_url_protected: true,
description: 'Cashback reward'
})
};
fetch('https://api.sandpay.dev/v1/disbursements', 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://api.sandpay.dev/v1/disbursements",
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' => 'XOF',
'country' => 'CI',
'msisdn' => '+22507123456',
'application' => 'my-store',
'reference' => '<string>',
'order_ref' => '<string>',
'order_url' => '<string>',
'is_url_protected' => true,
'description' => 'Cashback reward'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.sandpay.dev/v1/disbursements"
payload := strings.NewReader("{\n \"amount\": 5000,\n \"currency\": \"XOF\",\n \"country\": \"CI\",\n \"msisdn\": \"+22507123456\",\n \"application\": \"my-store\",\n \"reference\": \"<string>\",\n \"order_ref\": \"<string>\",\n \"order_url\": \"<string>\",\n \"is_url_protected\": true,\n \"description\": \"Cashback reward\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.sandpay.dev/v1/disbursements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 5000,\n \"currency\": \"XOF\",\n \"country\": \"CI\",\n \"msisdn\": \"+22507123456\",\n \"application\": \"my-store\",\n \"reference\": \"<string>\",\n \"order_ref\": \"<string>\",\n \"order_url\": \"<string>\",\n \"is_url_protected\": true,\n \"description\": \"Cashback reward\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandpay.dev/v1/disbursements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 5000,\n \"currency\": \"XOF\",\n \"country\": \"CI\",\n \"msisdn\": \"+22507123456\",\n \"application\": \"my-store\",\n \"reference\": \"<string>\",\n \"order_ref\": \"<string>\",\n \"order_url\": \"<string>\",\n \"is_url_protected\": true,\n \"description\": \"Cashback reward\"\n}"
response = http.request(request)
puts response.read_body{
"tx_id": "TX_DB7788AA",
"type": "disbursement",
"status": "SUCCESS",
"amount": 5000,
"merchant_balance_after": 123,
"recipient_balance_after": 123,
"idempotent": true
}{
"error": "quota_exceeded",
"message": "Monthly simulation quota exceeded.",
"detail": {}
}{
"error": "quota_exceeded",
"message": "Monthly simulation quota exceeded.",
"detail": {}
}{
"error": "quota_exceeded",
"message": "Monthly simulation quota exceeded.",
"detail": {}
}Corps
application/json
Réponse
Disbursement created (status SUCCESS, INSUFFICIENT_FUNDS, UNKNOWN_MSISDN, or ACCOUNT_BLOCKED).