Update beneficiary
curl --request PUT \
--url https://api.tandapay.io/api/b2b/external-accounts/{externalAccountId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payoutMethod": {
"accountName": "Kilimo Supplies Ltd",
"accountNumber": "01100765432100",
"code": "1243"
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payoutMethod: {
accountName: 'Kilimo Supplies Ltd',
accountNumber: '01100765432100',
code: '1243'
}
})
};
fetch('https://api.tandapay.io/api/b2b/external-accounts/{externalAccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tandapay.io/api/b2b/external-accounts/{externalAccountId}"
payload = { "payoutMethod": {
"accountName": "Kilimo Supplies Ltd",
"accountNumber": "01100765432100",
"code": "1243"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tandapay.io/api/b2b/external-accounts/{externalAccountId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'payoutMethod' => [
'accountName' => 'Kilimo Supplies Ltd',
'accountNumber' => '01100765432100',
'code' => '1243'
]
]),
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": "External account updated successfully."
}{
"success": false,
"message": "Unauthorized"
}Beneficiaries
Update beneficiary
Change a saved beneficiary’s details.
PUT
/
api
/
b2b
/
external-accounts
/
{externalAccountId}
Update beneficiary
curl --request PUT \
--url https://api.tandapay.io/api/b2b/external-accounts/{externalAccountId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"payoutMethod": {
"accountName": "Kilimo Supplies Ltd",
"accountNumber": "01100765432100",
"code": "1243"
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payoutMethod: {
accountName: 'Kilimo Supplies Ltd',
accountNumber: '01100765432100',
code: '1243'
}
})
};
fetch('https://api.tandapay.io/api/b2b/external-accounts/{externalAccountId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.tandapay.io/api/b2b/external-accounts/{externalAccountId}"
payload = { "payoutMethod": {
"accountName": "Kilimo Supplies Ltd",
"accountNumber": "01100765432100",
"code": "1243"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tandapay.io/api/b2b/external-accounts/{externalAccountId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'payoutMethod' => [
'accountName' => 'Kilimo Supplies Ltd',
'accountNumber' => '01100765432100',
'code' => '1243'
]
]),
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": "External account updated successfully."
}{
"success": false,
"message": "Unauthorized"
}Authorizations
Token from Generate bearer token.
Path Parameters
The beneficiary's ID.
Body
application/json
ISO 3166-1 alpha-2 country code. Tanda supports KE.
Available options:
KE Example:
"KE"
ISO 4217 currency code. Tanda supports KES.
Available options:
KES Example:
"KES"
Available options:
MoMo, Bank Account, Paybill, Till Show child attributes
Show child attributes

