---
title: "Create a virtual account"
method: POST
path: "/virtual-account"
---

# Create a virtual account

`POST /virtual-account`

## Request body

- object
  - `accountId` string, required — The account ID the virtual account should be created under.
  - `name` string, required — The name of the virtual account
  - `commissionDetails` union
    - object
      - `type` 'flatFee', required — The type of the commission rule. A type of flat_fee will take a flat fee from the virtual account and transfer it to the primary account with the frequency of the collection defined as monthly or yearly.
      - `amount` Money, required — Represents a monetary value
        - `amountCents` integer, required — The amount in cents
      - `frequency` 'monthly' | 'yearly', required — The frequency from the start date that the rule will be applied. E.g. a start date of November 26, 2024 with a frequency of "monthly" will have the rule applied on December 26, 2024. If the frequency was "yearly", the rule would be applied again on November 26, 2025.
      - `startDate` string, date-time — The date that the rule will begin to take effect.
    - object
      - `type` 'takeRate', required — The type of the commission rule. A type of take_rate will take a percent of the virtual account's funds and divert them to the primary account.
      - `takeRate` number, required — The percentage of funds to divert from the virtual account to the primary account.

## Response `201`

OK

- object
  - `virtualAccount` VirtualAccountModel, required — The virtual account object
    - `id` string, required — The ID of the virtual account.
    - `name` string, required — The name of the virtual account.
    - `accountNumber` string — The account number of the virtual account.
    - `routingNumber` string — The routing number of the virtual account.
    - `accountId` string, required — The account ID of the Slash account the virtual account is associated with.
    - `closedAt` string — The date the virtual account was closed; will be null if account was never closed.
    - `accountType` 'default' | 'primary', required — The account type of the virtual account. Since virtual accounts and Slash accounts exist at the same hierarchy level, an account type of 'primary' means it is the main Slash account, while an account type of 'default' means it is a virtual account under the main account.
  - `commissionRule` VirtualAccountCommissionRule — The virtual account commission rule object
    - `id` string, required — The ID of the commission rule
    - `virtualAccountId` string, required — The ID of the virtual account the commission rule is applied to
    - `commissionDetails` union, required
      - object
        - `type` 'flatFee', required — The type of the commission rule. A type of flat_fee will take a flat fee from the virtual account and transfer it to the primary account with the frequency of the collection defined as monthly or yearly.
        - `amount` Money, required — Represents a monetary value
          - `amountCents` integer, required — The amount in cents
        - `frequency` 'monthly' | 'yearly', required — The frequency from the start date that the rule will be applied. E.g. a start date of November 26, 2024 with a frequency of "monthly" will have the rule applied on December 26, 2024. If the frequency was "yearly", the rule would be applied again on November 26, 2025.
        - `startDate` string, date-time — The date that the rule will begin to take effect.
      - object
        - `type` 'takeRate', required — The type of the commission rule. A type of take_rate will take a percent of the virtual account's funds and divert them to the primary account.
        - `takeRate` number, required — The percentage of funds to divert from the virtual account to the primary account.

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `429` — TooManyRequests
- `500` — Internal Error

---

[API](https://skmtc.net/slashfi/apis/slash-public-api.md) · [All operations](https://skmtc.net/slashfi/apis/slash-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/slashfi/slash-public-api/versions/773c90f079c5/schema)
