Refund Deposit
curl --request POST \
--url https://api.zerocash.tech/api/b2b/fiat/deposit/{transactionId}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refundReason": "<string>",
"externalReference": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({refundReason: '<string>', externalReference: '<string>'})
};
fetch('https://api.zerocash.tech/api/b2b/fiat/deposit/{transactionId}/refund', 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/deposit/{transactionId}/refund"
payload = {
"refundReason": "<string>",
"externalReference": "<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/deposit/{transactionId}/refund",
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([
'refundReason' => '<string>',
'externalReference' => '<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/deposit/{transactionId}/refund"
payload := strings.NewReader("{\n \"refundReason\": \"<string>\",\n \"externalReference\": \"<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": "Transaction refund initiated successfully.",
"data": {
"refundTransactionId": "unique-refund-transaction-id",
"originalTransactionId": "unique-original-transaction-id"
}
}{}Charges
Refund Deposit
This API endpoint allows you to initiate a refund for a previously successful mobile money deposit transaction.
POST
/
api
/
b2b
/
fiat
/
deposit
/
{transactionId}
/
refund
Refund Deposit
curl --request POST \
--url https://api.zerocash.tech/api/b2b/fiat/deposit/{transactionId}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refundReason": "<string>",
"externalReference": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({refundReason: '<string>', externalReference: '<string>'})
};
fetch('https://api.zerocash.tech/api/b2b/fiat/deposit/{transactionId}/refund', 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/deposit/{transactionId}/refund"
payload = {
"refundReason": "<string>",
"externalReference": "<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/deposit/{transactionId}/refund",
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([
'refundReason' => '<string>',
'externalReference' => '<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/deposit/{transactionId}/refund"
payload := strings.NewReader("{\n \"refundReason\": \"<string>\",\n \"externalReference\": \"<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": "Transaction refund initiated successfully.",
"data": {
"refundTransactionId": "unique-refund-transaction-id",
"originalTransactionId": "unique-original-transaction-id"
}
}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The transactionId of the transaction.
Body
application/json
⌘I