> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onboard.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Sub-accounts

Sub-accounts let you represent individual customers or business units under
your primary account, each with an independent balance.

## Creating sub-accounts

Create a sub-account with [`POST /ledger/subaccounts`](/api-reference/endpoints/virtual-account/create-subaccount),
passing a `subAccountIdRef` — use your own internal customer or entity
identifier here, since it's how you'll reference the sub-account in every
subsequent call.

## Updating and deleting

* [`PUT /ledger/subaccounts/{subAccountIdRef}`](/api-reference/endpoints/virtual-account/update-subaccount) —
  rename a sub-account or freeze/unfreeze it.
* [`DELETE /ledger/subaccounts/{subAccountIdRef}`](/api-reference/endpoints/virtual-account/delete-subaccount) —
  delete a sub-account. The sub-account balance must be zero first.

## Inter-account transfers

Move funds between your primary account and any sub-account, or between two
sub-accounts, to rebalance or settle internally without touching an external
rail.
