Payouts
curl --request POST \
--url https://api.zerocash.tech/api/b2b/fiat/payout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 100,
"currency": "KES",
"country": "KE",
"destination": "MoMo",
"externalReference": "<string>",
"externalAccountId": "<string>",
"debitCurrency": "<string>",
"debitCountry": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 100,
currency: 'KES',
country: 'KE',
destination: 'MoMo',
externalReference: '<string>',
externalAccountId: '<string>',
debitCurrency: '<string>',
debitCountry: '<string>'
})
};
fetch('https://api.zerocash.tech/api/b2b/fiat/payout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerocash.tech/api/b2b/fiat/payout"
payload = {
"amount": 100,
"currency": "KES",
"country": "KE",
"destination": "MoMo",
"externalReference": "<string>",
"externalAccountId": "<string>",
"debitCurrency": "<string>",
"debitCountry": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerocash.tech/api/b2b/fiat/payout",
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' => 100,
'currency' => 'KES',
'country' => 'KE',
'destination' => 'MoMo',
'externalReference' => '<string>',
'externalAccountId' => '<string>',
'debitCurrency' => '<string>',
'debitCountry' => '<string>'
]),
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.zerocash.tech/api/b2b/fiat/payout"
payload := strings.NewReader("{\n \"amount\": 100,\n \"currency\": \"KES\",\n \"country\": \"KE\",\n \"destination\": \"MoMo\",\n \"externalReference\": \"<string>\",\n \"externalAccountId\": \"<string>\",\n \"debitCurrency\": \"<string>\",\n \"debitCountry\": \"<string>\"\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))
}{
"success": true,
"message": "Withdrawal Request Accepted for Processing.",
"transactionId": "mIt5ycmF3YCqaOQp6Ljz"
}{}Payouts
Payouts
This endpoint is a universal endpoint, below are schemas for different payouts such as mobile money or bank accounts and this endpoint allows you to payout to these destinations through this single endpoint.
POST
/
api
/
b2b
/
fiat
/
payout
Payouts
curl --request POST \
--url https://api.zerocash.tech/api/b2b/fiat/payout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 100,
"currency": "KES",
"country": "KE",
"destination": "MoMo",
"externalReference": "<string>",
"externalAccountId": "<string>",
"debitCurrency": "<string>",
"debitCountry": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 100,
currency: 'KES',
country: 'KE',
destination: 'MoMo',
externalReference: '<string>',
externalAccountId: '<string>',
debitCurrency: '<string>',
debitCountry: '<string>'
})
};
fetch('https://api.zerocash.tech/api/b2b/fiat/payout', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.zerocash.tech/api/b2b/fiat/payout"
payload = {
"amount": 100,
"currency": "KES",
"country": "KE",
"destination": "MoMo",
"externalReference": "<string>",
"externalAccountId": "<string>",
"debitCurrency": "<string>",
"debitCountry": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerocash.tech/api/b2b/fiat/payout",
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' => 100,
'currency' => 'KES',
'country' => 'KE',
'destination' => 'MoMo',
'externalReference' => '<string>',
'externalAccountId' => '<string>',
'debitCurrency' => '<string>',
'debitCountry' => '<string>'
]),
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.zerocash.tech/api/b2b/fiat/payout"
payload := strings.NewReader("{\n \"amount\": 100,\n \"currency\": \"KES\",\n \"country\": \"KE\",\n \"destination\": \"MoMo\",\n \"externalReference\": \"<string>\",\n \"externalAccountId\": \"<string>\",\n \"debitCurrency\": \"<string>\",\n \"debitCountry\": \"<string>\"\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))
}{
"success": true,
"message": "Withdrawal Request Accepted for Processing.",
"transactionId": "mIt5ycmF3YCqaOQp6Ljz"
}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
ISO 3166-1 alpha-2 country code
MoMo / Bank Account
A unique ID of your liking to reconcile transactions internally.
Show child attributes
Show child attributes
The wallet you want to be debited from. If missing, we will default to the currency passed.
ISO 3166-1 alpha-2 country scope of the wallet being debited. Required when debitCurrency is different from currency and the debit wallet currency can exist in multiple country scopes, such as USD or XOF.