Refund deposit
curl --request POST \
--url https://api.tandapay.io/api/b2b/fiat/deposit/{transactionId}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refundReason": "Order cancelled by customer",
"externalReference": "refund_order_10045"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
refundReason: 'Order cancelled by customer',
externalReference: 'refund_order_10045'
})
};
fetch('https://api.tandapay.io/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.tandapay.io/api/b2b/fiat/deposit/{transactionId}/refund"
payload = {
"refundReason": "Order cancelled by customer",
"externalReference": "refund_order_10045"
}
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.tandapay.io/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' => 'Order cancelled by customer',
'externalReference' => 'refund_order_10045'
]),
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;
}{
"success": true,
"message": "Transaction refund initiated successfully.",
"data": {
"refundTransactionId": "rF4gH6jK8lM0nP2qR4sT",
"originalTransactionId": "aB3dE5fG7hJ9kL1mN2pQ"
}
}{
"success": false,
"message": "Unauthorized"
}Collections
Refund deposit
Refund a successful mobile money deposit.
POST
/
api
/
b2b
/
fiat
/
deposit
/
{transactionId}
/
refund
Refund deposit
curl --request POST \
--url https://api.tandapay.io/api/b2b/fiat/deposit/{transactionId}/refund \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"refundReason": "Order cancelled by customer",
"externalReference": "refund_order_10045"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
refundReason: 'Order cancelled by customer',
externalReference: 'refund_order_10045'
})
};
fetch('https://api.tandapay.io/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.tandapay.io/api/b2b/fiat/deposit/{transactionId}/refund"
payload = {
"refundReason": "Order cancelled by customer",
"externalReference": "refund_order_10045"
}
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.tandapay.io/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' => 'Order cancelled by customer',
'externalReference' => 'refund_order_10045'
]),
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;
}{
"success": true,
"message": "Transaction refund initiated successfully.",
"data": {
"refundTransactionId": "rF4gH6jK8lM0nP2qR4sT",
"originalTransactionId": "aB3dE5fG7hJ9kL1mN2pQ"
}
}{
"success": false,
"message": "Unauthorized"
}Authorizations
Token from Generate bearer token.
Path Parameters
The transactionId of the successful deposit.
Body
application/json

