curl --request POST \
--url https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"id": "4d5e6f70-8192-4a3b-9c4d-5e6f7081920a",
"accountId": "b2a1f0e9-8c7d-4e3a-9f21-0a1b2c3d4e5f",
"bankAccountType": "EUR_SEPA",
"name": "EUR Deposits",
"status": "CLOSED",
"providerClosureStatus": "SUCCEEDED",
"currency": "EUR",
"targetCryptocurrency": "USDC",
"iban": "DE89370400440532013000",
"bic": "DEUTDEDB",
"bankName": "Example Bank",
"beneficiaryName": "Jane Doe",
"referenceCode": "VFY-7K2Q-931",
"depositRails": [
{
"railType": "SEPA",
"iban": "DE89370400440532013000",
"bic": "DEUTDEDB",
"bankName": "Example Bank",
"beneficiaryName": "Jane Doe",
"paymentReference": "VFY-7K2Q-931"
}
],
"createdAt": "2026-01-15T09:30:00Z",
"updatedAt": "2026-09-02T14:05:31Z"
}
}{
"success": false,
"errors": [
{
"code": "unauthenticated",
"message": "Please authenticate to perform this action."
}
]
}{
"success": false,
"errors": [
{
"code": "forbidden",
"message": "You do not have permission to access this resource."
}
]
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "internal-error",
"message": "An unexpected error occurred. Please try again later."
}
]
}Close a virtual bank account
Decommission a virtual bank account so its bank details stop accepting money.
curl --request POST \
--url https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.venlyfinance.com/v1/accounts/{accountId}/virtual-bank-accounts/{virtualBankAccountId}/close")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"id": "4d5e6f70-8192-4a3b-9c4d-5e6f7081920a",
"accountId": "b2a1f0e9-8c7d-4e3a-9f21-0a1b2c3d4e5f",
"bankAccountType": "EUR_SEPA",
"name": "EUR Deposits",
"status": "CLOSED",
"providerClosureStatus": "SUCCEEDED",
"currency": "EUR",
"targetCryptocurrency": "USDC",
"iban": "DE89370400440532013000",
"bic": "DEUTDEDB",
"bankName": "Example Bank",
"beneficiaryName": "Jane Doe",
"referenceCode": "VFY-7K2Q-931",
"depositRails": [
{
"railType": "SEPA",
"iban": "DE89370400440532013000",
"bic": "DEUTDEDB",
"bankName": "Example Bank",
"beneficiaryName": "Jane Doe",
"paymentReference": "VFY-7K2Q-931"
}
],
"createdAt": "2026-01-15T09:30:00Z",
"updatedAt": "2026-09-02T14:05:31Z"
}
}{
"success": false,
"errors": [
{
"code": "unauthenticated",
"message": "Please authenticate to perform this action."
}
]
}{
"success": false,
"errors": [
{
"code": "forbidden",
"message": "You do not have permission to access this resource."
}
]
}{
"success": false,
"errors": [
{
"code": "invalid-request",
"message": "The request contains invalid parameters."
}
],
"result": {}
}{
"success": false,
"errors": [
{
"code": "internal-error",
"message": "An unexpected error occurred. Please try again later."
}
]
}manage:accounts — see Required scopes.
Moves an ACTIVE virtual bank account to CLOSED and asks the payment provider to decommission the bank details. The local transition is applied first, so a provider outage never blocks a closure.
providerClosureStatus on the response. Only SUCCEEDED means the bank details are dead. FAILED means they are presumed live — call this endpoint again; it is idempotent and retries only the provider leg.(currency, targetCryptocurrency) slot immediately, so a replacement can be created straight away. Money that still arrives on closed details is recorded and can be settled by Venly afterwards; it is never lost. CLOSED accounts stay visible in list and detail reads. See Closing a virtual bank account.Authorizations
OAuth2 client credentials flow. Token endpoints:
- Token URL
- https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token
Headers
Which tenant the request is scoped to, among those your token grants. Omit it when the token grants exactly one tenant; it is required when the token grants more than one. A supplied value must exactly match a tenant the token grants.
Absent when required, blank, malformed, or naming a tenant the token does not grant — each gets
the same generic 403 forbidden, which reveals neither whether a tenant exists nor which ones
you may use. Send the header once: a repeated header is rejected the same way.
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
Path Parameters
Unique account identifier
Unique virtual bank account identifier
Response
Virtual bank account closed (or already closed — the call is idempotent)
Indicates whether the request was successful
Virtual bank account for receiving fiat payments that are auto-converted to crypto.
EUR_SEPA accounts return iban/bic; USD_ACH accounts return
accountNumber/routingNumber. Read depositRails for the complete instruction set
per rail — the summary fields below always describe the primary rail.
Show child attributes
Show child attributes
Was this page helpful?

