---
title: "Close a virtual account"
method: PATCH
path: "/virtual_accounts/{id}/close"
tags: ["Virtual Accounts"]
---

# Close a virtual account

`PATCH /virtual_accounts/{id}/close`

## Request

- Base URL: `https://api.cert.zerohash.com`
- URL: `https://api.cert.zerohash.com/virtual_accounts/{id}/close`
- Auth: API key in header `X-SCX-API-KEY` and API key in header `X-SCX-PASSPHRASE`

Requests closure. Closing is asynchronous: a `202 Accepted` returns the record with `status: CLOSING`, and the account reaches `CLOSED` once the banking partner acknowledges. Poll `GET /virtual_accounts/{id}` for the transition. Calling it again while a close is in flight, or after it completes, returns `200 OK`. Accounts in `PENDING`, `BLOCKED` or `FAILED` cannot be closed and return `409 Conflict`. An unknown id or an account belonging to another platform return `404 Not Found`. The request body is empty.

## Path parameters

- `id` string, uuid, required

## Headers

- `X-SCX-SIGNED` string, required
- `X-SCX-TIMESTAMP` string, required

## Response `200`

A closure was already in flight or already complete.

- VirtualAccountCloseResponse: The resulting state of a close request. Fetch `GET /virtual_accounts/{id}` for the full record, including `bank_details`.
  - `id` string, uuid
  - `status` 'PENDING' | 'ACTIVE' | 'CLOSING' | 'CLOSED' | 'BLOCKED' | 'FAILED', nullable

## Other responses

- `202`: Closure accepted; the record is now `CLOSING`.
- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `409`: The virtual account is not in a closable state.
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-11-03** `47cf70ae701c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zerohash/apis/zerohash-api/changes/virtual_accounts/:id/close/patch.md)

---

[API](https://skmtc.dev/zerohash/apis/zerohash-api.md) - [All operations](https://skmtc.dev/zerohash/apis/zerohash-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zerohash/apis/zerohash-api/revisions/47cf70ae701c?raw)
