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

# Create a virtual account

> Create a virtual account for a user. A virtual account provides bank
details that, when funded via fiat, automatically onramp the deposit into
a stablecoin delivered to the configured wallet.

The `source` combination of `currency`, `country`, and `transferType` must
be a supported pair. Provide exactly one of `destination.walletId` or
`destination.externalWalletId`.




## OpenAPI

````yaml https://production.hifi.com/api/v3/openapi.json post /v3/users/{userId}/virtual-accounts
openapi: 3.0.0
info:
  title: Hifi API
  version: 3.0.0
  description: API documentation for HIFI
servers:
  - url: https://production.hifi.com
    description: Production server
  - url: https://sandbox.hifi.com
    description: Sandbox server
security:
  - bearerAuth: []
tags:
  - name: Common
    description: Common endpoints
  - name: User
    description: User endpoints
  - name: Counter Party
    description: Counter party endpoints
  - name: Crypto Transfer
    description: Crypto transfer and batch transfer endpoints
  - name: Wallet
    description: Wallet and wallet offer endpoints
  - name: External Account
    description: External bank account endpoints (under a counter party)
  - name: External Wallet
    description: External wallet endpoints (under a counter party)
  - name: External Card
    description: External card endpoints (under a counter party)
  - name: Token Swap
    description: Token swap endpoints
  - name: Bridge
    description: Bridge endpoints
  - name: Virtual Account
    description: Virtual account endpoints
  - name: Compliance
    description: Compliance and compliance link endpoints
  - name: Webhook Endpoint
    description: Webhook endpoint endpoints
  - name: File
    description: File upload endpoints
  - name: Onramp
    description: Onramp (fiat to crypto) endpoints
  - name: Offramp
    description: Offramp (crypto to fiat) endpoints
  - name: Orchestration Address
    description: Orchestration (liquidation) address endpoints
  - name: KYC Link
    description: Hosted and custom KYC/KYB link endpoints
  - name: Transfer Approval
    description: Transfer approval endpoints
  - name: Corridor
    description: Supported fiat/crypto transfer corridor endpoints
  - name: Migration
    description: v2-to-v3 ID mapping endpoints
paths:
  /v3/users/{userId}/virtual-accounts:
    post:
      tags:
        - Virtual Account
      summary: Create a virtual account
      description: >
        Create a virtual account for a user. A virtual account provides bank

        details that, when funded via fiat, automatically onramp the deposit
        into

        a stablecoin delivered to the configured wallet.


        The `source` combination of `currency`, `country`, and `transferType`
        must

        be a supported pair. Provide exactly one of `destination.walletId` or

        `destination.externalWalletId`.
      operationId: v3CreateVirtualAccount
      parameters:
        - $ref: '#/components/parameters/UserIdPathParameter'
      requestBody:
        $ref: '#/components/requestBodies/CreateVirtualAccountBody'
      responses:
        '200':
          $ref: '#/components/responses/CreateVirtualAccountResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  parameters:
    UserIdPathParameter:
      name: userId
      in: path
      schema:
        type: string
        pattern: ^user_[A-Za-z0-9]+$
      description: ID of the user.
      required: true
  requestBodies:
    CreateVirtualAccountBody:
      required: true
      description: >
        Virtual account details. The `source` combination of `currency`,
        `country`,

        and `transferType` must be a supported pair. Exactly one of

        `destination.walletId` or `destination.externalWalletId` must be
        provided.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualAccountCreate'
          examples:
            HifiWalletDestination:
              summary: Deliver to a HIFI custodial wallet
              value:
                source:
                  currency: USD
                  country: USA
                  transferType: ACH
                destination:
                  currency: USDC
                  walletId: wlt_1aLcs3Kf9dQ2mNpXwZ7bV
            ExternalWalletDestination:
              summary: Deliver to an external wallet
              value:
                source:
                  currency: USD
                  country: USA
                  transferType: WIRE
                destination:
                  currency: USDT
                  externalWalletId: extw_4mNpXwZ7bV1aLcs3Kf9dQ
  responses:
    CreateVirtualAccountResponse:
      description: Virtual account created successfully.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/VirtualAccountObject'
          example:
            id: va_5Kf9dQ2mNpXwZ7bV1aLcs
            userId: usr_3Kf9dQ2mNpXwZ7bV1aLcs
            source:
              transferTypes:
                - ACH
                - WIRE
                - RTP
              currency: USD
            destination:
              chain: POLYGON
              currency: USDC
              walletAddress: '0x1234567890abcdef1234567890abcdef12345678'
              walletId: wlt_1aLcs3Kf9dQ2mNpXwZ7bV
              externalWalletId: null
            status: ACTIVE
            microDeposits:
              count: 0
              data: []
            depositInstructions:
              bankName: Example Bank
              bankAddress: 123 Main Street, New York, NY 10001
              beneficiary:
                name: ACME Corp
                address: 123 Main Street, New York, NY 10001, USA
              ach:
                routingNumber: '021000021'
                accountNumber: '123456789012'
              wire:
                routingNumber: '021000021'
                accountNumber: '123456789012'
              rtp:
                routingNumber: '021000021'
                accountNumber: '123456789012'
              reference: null
              depositBy: null
              instruction: Please deposit USD to the bank account provided.
            settlementRuleId: null
            createdAt: '2026-07-01T10:30:00.000Z'
            updatedAt: '2026-07-01T10:30:00.000Z'
    BadRequestResponse:
      description: Bad Request — the request was malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: VALIDATION_ERROR
            message: One or more fields are invalid or missing.
            fields:
              - code: invalid_value
                message: Must be a valid email address
                field: email
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    ConflictResponse:
      description: >-
        Conflict — the request collides with the current state of the resource
        (e.g. idempotency-key reuse with a different payload).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            type: RESOURCE_CONFLICT
            message: Resource already exists or conflicts with current state
    InternalServerErrorResponse:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  schemas:
    VirtualAccountCreate:
      type: object
      description: Virtual account creation request.
      required:
        - source
        - destination
      properties:
        source:
          $ref: '#/components/schemas/VirtualAccountSource'
        destination:
          $ref: '#/components/schemas/VirtualAccountDestination'
    VirtualAccountObject:
      type: object
      description: A virtual account.
      properties:
        id:
          type: string
          description: Public ID of the virtual account (prefixed with `va_`).
          example: va_5Kf9dQ2mNpXwZ7bV1aLcs
        userId:
          type: string
          description: >-
            Public ID of the user this virtual account belongs to (prefixed with
            `usr_`).
          example: usr_3Kf9dQ2mNpXwZ7bV1aLcs
        source:
          $ref: '#/components/schemas/VirtualAccountSourceObject'
        destination:
          $ref: '#/components/schemas/VirtualAccountDestinationObject'
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
        microDeposits:
          $ref: '#/components/schemas/VirtualAccountMicroDeposits'
        depositInstructions:
          $ref: '#/components/schemas/VirtualAccountDepositInstructions'
        settlementRuleId:
          type: string
          description: >-
            Public ID of the applied settlement rule (prefixed with `sr_`), if
            any.
          nullable: true
          example: null
        createdAt:
          type: string
          format: date-time
          example: '2026-07-01T10:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-07-01T10:30:00.000Z'
    ApiError:
      type: object
      description: >-
        Standard v3 error shape, returned by validation failures and
        business-logic errors alike.
      properties:
        type:
          type: string
          description: >-
            Machine-readable error type, e.g. VALIDATION_ERROR,
            ACTION_NOT_ALLOWED, RESOURCE_CONFLICT.
          example: VALIDATION_ERROR
        message:
          type: string
          description: Human-readable error message.
          example: One or more fields are invalid or missing.
        fields:
          type: array
          description: >-
            Present on field-level validation errors. One entry per problem
            field.
          items:
            type: object
            properties:
              code:
                type: string
                description: Error code related to the field issue.
              message:
                type: string
                description: Error message for the specific issue.
              field:
                type: string
                description: The name of the field that has an issue.
    Unauthorized:
      type: object
      properties:
        type:
          type: string
          description: Unauthorized enum
          example: UNAUTHORIZED
        message:
          type: string
          description: Unauthorized message
          example: Authentication required
    InternalServerError:
      type: object
      properties:
        type:
          type: string
          example: INTERNAL_SERVER_ERROR
          description: Internal server error enum
        message:
          type: string
          example: An internal server error occurred
          description: Internal server error message
    VirtualAccountSource:
      type: object
      description: |
        Fiat source the virtual account receives deposits in. The combination of
        `currency`, `country`, and `transferType` must be a supported pair.
      required:
        - currency
        - country
        - transferType
      properties:
        currency:
          type: string
          enum:
            - USD
          description: ISO 4217 fiat currency the virtual account accepts.
          example: USD
        country:
          type: string
          enum:
            - USA
          description: ISO 3166-1 alpha-3 country code of the source rail.
          example: USA
        transferType:
          type: string
          enum:
            - ACH
            - WIRE
            - RTP
          description: Fiat transfer rail used to fund the virtual account.
          example: ACH
    VirtualAccountDestination:
      type: object
      description: >
        Stablecoin destination that incoming fiat deposits are converted to and

        delivered to. Exactly one of `walletId` or `externalWalletId` must be
        set.
      required:
        - currency
      properties:
        currency:
          type: string
          enum:
            - USDC
            - USDT
            - PYUSD
            - USDG
            - PYUSD0
            - USDCX
          description: Destination stablecoin.
          example: USDC
        walletId:
          type: string
          description: >-
            Public ID of a HIFI custodial wallet (prefixed with `wlt_`).
            Mutually exclusive with `externalWalletId`.
          example: wlt_1aLcs3Kf9dQ2mNpXwZ7bV
        externalWalletId:
          type: string
          description: >-
            Public ID of an external wallet (prefixed with `extw_`). Mutually
            exclusive with `walletId`.
          example: extw_4mNpXwZ7bV1aLcs3Kf9dQ
    VirtualAccountSourceObject:
      type: object
      description: Fiat source configuration of the virtual account.
      properties:
        transferTypes:
          type: array
          description: Fiat transfer rails accepted by this virtual account.
          items:
            type: string
            enum:
              - ACH
              - WIRE
              - RTP
          example:
            - ACH
            - WIRE
            - RTP
        currency:
          type: string
          enum:
            - USD
          example: USD
    VirtualAccountDestinationObject:
      type: object
      description: Stablecoin destination of the virtual account.
      properties:
        chain:
          type: string
          description: Blockchain the destination stablecoin is delivered on.
          enum:
            - ETHEREUM
            - POLYGON
            - SOLANA
            - BASE
            - FLOW_EVM
            - ARBITRUM
            - BSC
            - TRON
            - CANTON
          example: POLYGON
        currency:
          type: string
          enum:
            - USDC
            - USDT
            - PYUSD
            - USDG
            - PYUSD0
            - USDCX
          example: USDC
        walletAddress:
          type: string
          description: On-chain address funds are delivered to.
          example: '0x1234567890abcdef1234567890abcdef12345678'
        walletId:
          type: string
          description: >-
            Public ID of the HIFI custodial wallet, if the destination is a HIFI
            wallet (prefixed with `wlt_`).
          nullable: true
          example: wlt_1aLcs3Kf9dQ2mNpXwZ7bV
        externalWalletId:
          type: string
          description: >-
            Public ID of the external wallet, if the destination is an external
            wallet (prefixed with `extw_`).
          nullable: true
          example: null
    VirtualAccountMicroDeposits:
      type: object
      nullable: true
      description: Deposits received into the virtual account.
      properties:
        count:
          type: integer
          example: 0
        data:
          type: array
          items:
            $ref: '#/components/schemas/VirtualAccountMicroDepositItem'
          example: []
    VirtualAccountDepositInstructions:
      type: object
      nullable: true
      description: |
        Bank details for funding the virtual account. Null until the account is
        active.
      properties:
        bankName:
          type: string
          example: Example Bank
        bankAddress:
          type: string
          example: 123 Main Street, New York, NY 10001
        beneficiary:
          type: object
          properties:
            name:
              type: string
              example: ACME Corp
            address:
              type: string
              example: 123 Main Street, New York, NY 10001, USA
        ach:
          type: object
          properties:
            routingNumber:
              type: string
              example: '021000021'
            accountNumber:
              type: string
              example: '123456789012'
        wire:
          type: object
          properties:
            routingNumber:
              type: string
              example: '021000021'
            accountNumber:
              type: string
              example: '123456789012'
        rtp:
          type: object
          properties:
            routingNumber:
              type: string
              example: '021000021'
            accountNumber:
              type: string
              example: '123456789012'
        reference:
          type: string
          nullable: true
          example: null
        depositBy:
          type: string
          format: date-time
          nullable: true
          example: null
        instruction:
          type: string
          example: Please deposit USD to the bank account provided.
    VirtualAccountMicroDepositItem:
      type: object
      properties:
        createdAt:
          type: string
          format: date-time
          example: '2026-07-01T10:35:00.000Z'
        currency:
          type: string
          example: USD
        amount:
          type: number
          example: 100
        sourceBankInfo:
          $ref: '#/components/schemas/VirtualAccountMicroDepositSourceBankInfo'
    VirtualAccountMicroDepositSourceBankInfo:
      type: object
      description: Details of the bank that sent a deposit.
      properties:
        bankName:
          type: string
          example: Example Bank
        senderName:
          type: string
          example: Jane Doe
        routingNumber:
          type: string
          example: '021000021'
        accountNumber:
          type: string
          example: '123456789'
        accountType:
          type: string
          example: CHECKING
        fedBatchId:
          type: string
          nullable: true
          example: null
        imad:
          type: string
          nullable: true
          example: null
        omad:
          type: string
          nullable: true
          example: null
        traceNumber:
          type: string
          nullable: true
          example: null
        bankAddress:
          type: string
          nullable: true
          example: null
        description:
          type: string
          nullable: true
          example: null
        references:
          type: object
          nullable: true
          example: null
        paymentRail:
          type: string
          example: ach
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````