Detach Account
This endpoint allows you to decommission a virtual account using the virtual account tracking ID or the account number
POST https://api.oneappgo.com/v1/detach-virtualaccount
Headers
Name
Type
Description
authorization*
String
SECRET_KEY
Request Body
Name
Type
Description
trackingid*
String
Kindly pass the account tracking id or account number
{
"status": true,
"responsecode": "01",
"msg": "Account Number Successfully Detached",
}Take a look at how you might do this:
curl --location 'https://api.oneappgo.com/v1/detach-virtualaccount' \
--header 'Authorization: Bearer SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"trackingid": "271871227"
}'var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.oneappgo.com/v1/detach-virtualaccount',
'headers': {
'Authorization': 'Bearer SECRET_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"trackingid": "271871227"
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.oneappgo.com/v1/detach-virtualaccount',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"trackingid": "271871227"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer SECRET_KEY',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var headers = {
'Authorization': 'Bearer SECRET_KEY',
'Content-Type': 'application/json'
};
var request = http.Request('POST', Uri.parse('https://api.oneappgo.com/v1/detach-virtualaccount'));
request.body = json.encode({
"trackingid": "271871227"
});
request.headers.addAll(headers);
http.StreamedResponse response = await request.send();
if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}
Last updated
Was this helpful?