Create a virtual account

Requests a virtual account for a participant. The account is created asynchronously: this endpoint returns 202 Accepted with status: PENDING and no bank_details, and the account becomes ACTIVE once the banking partner issues it. Poll GET /virtual_accounts/{id} for the transition. Idempotency is keyed solely on the required Idempotency-Key header, which also becomes the account id — replaying the same key returns 200 OK with the existing record, while a different key against the same participant creates a second, distinct account. An optional account_label routes every deposit into the account, and any auto-convert-and-withdraw payout, to that labeled account; it is set once at creation.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

The Virtual Accounts (VA) service lets a platform provision virtual accounts on behalf of its participants over the zerohash API. Each virtual account is backed by a banking provider and has its own account details, status, currency, and settlement policy.

Virtual accounts are scoped to a participant within a platform — every account carries both a participant_code and a platform_code.

Multiple virtual accounts per participant

A single participant can hold multiple virtual accounts under the same platform, and there is no system-imposed limit on how many may be created. Additional accounts can be created even when the participant already has one or more active accounts.

  • A participant may have more than one account in ACTIVE status at the same time.
  • Creating with a new Idempotency-Key always provisions a distinct new account.
    • Replaying the same key returns the existing record rather than creating a duplicate.
  • A participant can hold accounts with different settlement policies simultaneously.
  • zerohash does not cap the number of accounts per participant; any limit on account count is enforced by the platform.

Creating a virtual account

POST /virtual_accounts

The request requires a participant_code and a settlement_policy. Optional fields include a virtual_account_name label (immutable after creation), named_account, and an account_label used to route deposits (immutable, defaults to general).

Creation is asynchronous: the endpoint returns 202 Accepted with the account in PENDING status, and the account transitions to ACTIVE once the banking provider issues it. If creation is declined, the account resolves to FAILED with a status detail explaining the outcome.

Settlement policies

Each account is created with a settlement policy that governs how incoming funds are handled:

PolicyBehavior
HOLDIncoming funds are held as a balance in the virtual account.
AUTO_CONVERT_AND_WITHDRAWIncoming funds are converted to a specified asset and sent to a previously linked external account. Requires the target asset and external_account_id.

Account lifecycle (status)

A virtual account moves through the following states: PENDING, ACTIVE, CLOSING, CLOSED, BLOCKED, and FAILED. Account details are populated once the account reaches ACTIVE.

Retrieving virtual accounts

GET /virtual_accounts returns a participant's virtual accounts, paginated by page and page_size and filtered by participant_code. The response includes the list of accounts along with pagination metadata (page, page_size, total_pages, count). Because a participant can hold several accounts, this list may contain multiple active accounts as well as any historical FAILED records.

Body Params
string
required

The participant the virtual account is issued to. The platform is taken from the authenticated API key and must not be supplied.

settlement_policy
required

Required — choose how money settles once it lands in the account (no default):

  • HOLD — the USD you send settles as a USD balance in the virtual account.
  • AUTO_CONVERT_AND_WITHDRAW — the incoming USD is converted into the selected asset and sent to the external_account_id previously linked to the participant.
string
enum

Banking partner to back the account. Optional; defaults to CRB, the only supported value. Any other value is rejected with 400.

Allowed:
string
length between 1 and 255
^[\t\x20]*[\x21-\x7E][\t\x20-\x7E]*$

Optional label for the account, used verbatim as the title on the banking partner’s own record. Omit it and the title is derived from the participant’s name as before. Set once at creation: a replay of the same Idempotency-Key returns the originally-stored name and does not update it. Must be 1-255 characters, each printable ASCII (U+0020-U+007E) or tab, and not only whitespace; anything else is rejected with 400.

boolean

Optional; defaults to false. Persisted and echoed back, but drives no behaviour today — reserved for a future named-account feature.

string
length ≤ 40

Optional. Routes deposits and AUTO_CONVERT_AND_WITHDRAW payouts to a named account instead of general. No leading/trailing special chars; max 40 chars. Invalid value returns 400. Immutable.

Headers
string
required

HMAC-SHA256 signature of the request, base64-encoded. See the Authentication guide for the exact signing formula.

string
required

Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.

uuid
required

A UUID v4 chosen by the caller. Becomes the virtual account id. Omitting it returns 400 MISSING_IDEMPOTENCY_KEY; a non-UUIDv4 value returns 400 INVALID_IDEMPOTENCY_KEY.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json