Close a virtual bank account
curl --request POST \
--url https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "No longer needed"
}
'import requests
url = "https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close"
payload = { "reason": "No longer needed" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'No longer needed'})
};
fetch('https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"No longer needed\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close",
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([
'reason' => 'No longer needed'
]),
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;
}{
"message": "Virtual bank account closure initiated successfully",
"account_id": "vba_123456789"
}{
"message": "Virtual bank account is already closed"
}{
"message": "Invalid or missing access token"
}{
"message": "Virtual bank account not found"
}Virtual Bank Account
Close a virtual bank account
Initiate closure of a virtual bank account. Supported currencies: GBP, EUR, NGN, USD. Returns 400 if already closed or provider/currency not supported; 404 if not found. Required scope: virtual-account:close.
POST
/
api
/
external
/
virtual-bank-account
/
{id}
/
close
Close a virtual bank account
curl --request POST \
--url https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "No longer needed"
}
'import requests
url = "https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close"
payload = { "reason": "No longer needed" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'No longer needed'})
};
fetch('https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));require 'uri'
require 'net/http'
url = URI("https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"No longer needed\"\n}"
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-prod.blaaiz.com/api/external/virtual-bank-account/{id}/close",
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([
'reason' => 'No longer needed'
]),
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;
}{
"message": "Virtual bank account closure initiated successfully",
"account_id": "vba_123456789"
}{
"message": "Virtual bank account is already closed"
}{
"message": "Invalid or missing access token"
}{
"message": "Virtual bank account not found"
}Authorizations
Use your OAuth client credentials to obtain a short-lived Bearer token from POST /oauth/token.
Path Parameters
Virtual bank account ID
Body
application/json
Optional reason for closing the virtual bank account.
Maximum string length:
200Was this page helpful?
⌘I

