Skip to main content
POST
Close a virtual bank account
Requires scope: 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.
Read 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.
Closing frees the account’s (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

FlowClient Credentials
Token URL
https://login-staging.venly.io/auth/realms/VenlyFinance/protocol/openid-connect/token

Headers

x-tenant-id
string<uuid>

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.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Path Parameters

accountId
string<uuid>
required

Unique account identifier

virtualBankAccountId
string<uuid>
required

Unique virtual bank account identifier

Response

Virtual bank account closed (or already closed — the call is idempotent)

success
boolean

Indicates whether the request was successful

result
object

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.