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

# Create Virtual Account

> Create a virtual account for an identity to receive fiat deposits and convert to crypto



## OpenAPI

````yaml /v2/openapi.yaml post /v2/identities/{identity_id}/virtual-accounts
openapi: 3.1.0
info:
  title: Bastion APIs
  version: '2.0'
servers:
  - url: https://api.prod.bastion.com
    description: Production environment
  - url: https://api.sandbox.bastion.io
    description: Sandbox environment
security:
  - auth: []
tags:
  - name: Bastion APIs
paths:
  /v2/identities/{identity_id}/virtual-accounts:
    post:
      tags:
        - Virtual Accounts
      summary: Create Virtual Account
      description: >-
        Create a virtual account for an identity to receive fiat deposits and
        convert to crypto
      operationId: bastion.api.v2.API.CreateVirtualAccount
      parameters:
        - name: identity_id
          in: path
          description: Identity to create the virtual account for.
          required: true
          schema:
            type: string
            title: identity_id
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                identity_id:
                  type: string
                  title: identity_id
                  description: Identity to create the virtual account for.
                request_id:
                  type: string
                  title: request_id
                  description: >-
                    Request identifier in a UUID format. Serves as an
                    idempotency key.
                source:
                  $ref: >-
                    #/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountSource
                  title: source
                  description: Fiat deposit configuration.
                destination:
                  $ref: >-
                    #/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountDestination
                  description: Asset delivery configuration.
              title: CreateVirtualAccountRequest
              required:
                - identity_id
                - request_id
                - source
                - destination
              additionalProperties: false
        required: true
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccount
        '400':
          description: Bad request
        '401':
          description: Unauthorized Request
        '403':
          description: Request Forbidden
        '409':
          description: Conflict - duplicate request_id
        '500':
          description: Internal Server Error
components:
  schemas:
    bastion.api.v2.virtual_accounts.VirtualAccountSource:
      type: object
      properties:
        banking_country:
          type: string
          title: banking_country
          description: >-
            Country determines the banking partner (e.g. "US" -> CRB, "BR" ->
            Borderless).
      title: VirtualAccountSource
      required:
        - banking_country
      additionalProperties: false
      description: 'Fiat side: what the VA accepts as deposits.'
    bastion.api.v2.virtual_accounts.VirtualAccountDestination:
      type: object
      allOf:
        - properties:
            currency:
              $ref: >-
                #/components/schemas/bastion.api.v2.conversions.ConversionCurrency
              title: currency
              description: Target cryptocurrency after conversion (e.g. USDC).
            chain:
              $ref: '#/components/schemas/bastion.common.Chain'
              title: chain
              description: >-
                (OPTIONAL) Blockchain network. Required when destination is
                on-chain.
        - oneOf:
            - type: object
              properties:
                account_id:
                  type: string
                  title: account_id
                  description: >-
                    Use Bastion wallet. Required until external_wallet_address
                    is enabled.
              title: account_id
              required:
                - account_id
            - type: object
              properties:
                external_wallet_address:
                  type: string
                  title: external_wallet_address
                  description: External wallet address. Not yet enabled.
              title: external_wallet_address
              required:
                - external_wallet_address
      required:
        - currency
      additionalProperties: false
      description: 'Crypto side: where converted assets are delivered.'
    bastion.api.v2.virtual_accounts.VirtualAccount:
      type: object
      properties:
        id:
          type: string
          title: id
          description: Unique identifier for this virtual account.
          readOnly: true
        identity_id:
          type: string
          title: identity_id
          description: Bastion identity that owns the account.
          readOnly: true
        status:
          $ref: >-
            #/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountStatus
          title: status
          description: Current status.
          readOnly: true
        source:
          $ref: >-
            #/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountSource
          title: source
          description: 'Source: fiat deposit configuration.'
          readOnly: true
        destination:
          $ref: >-
            #/components/schemas/bastion.api.v2.virtual_accounts.VirtualAccountDestination
          description: 'Destination: asset delivery configuration.'
          readOnly: true
        deposit_instructions:
          $ref: '#/components/schemas/bastion.api.v2.conversions.DepositInstructions'
          title: deposit_instructions
          description: |-
            Deposit instructions (populated when status = ACTIVE).
             Returned synchronously by providers that support it (e.g. CRB/MT).
          readOnly: true
        created_at:
          type: string
          title: created_at
          readOnly: true
        updated_at:
          type: string
          title: updated_at
          readOnly: true
      title: VirtualAccount
      additionalProperties: false
    bastion.api.v2.conversions.ConversionCurrency:
      type: string
      title: ConversionCurrency
      enum:
        - CONVERSION_CURRENCY_UNSPECIFIED
        - USDC
        - USD
        - MXN
        - INR
        - KRW
        - USDT
        - GHS
        - EUR
      description: |-
        Currency of a conversion.
         The currency can be a stablecoin or a fiat currency.
      example: USDC
    bastion.common.Chain:
      type: string
      title: Chain
      enum:
        - CHAIN_UNSPECIFIED
        - ETHEREUM_MAINNET
        - POLYGON_MAINNET
        - ETHEREUM_TESTNET
        - OPTIMISM_SEPOLIA
        - BASE_MAINNET
        - BASE_SEPOLIA
        - OPTIMISM_MAINNET
        - POLYGON_AMOY
        - SOLANA_MAINNET
        - SOLANA_DEVNET
      description: Chain identifier
      example: ETHEREUM_MAINNET
    bastion.api.v2.virtual_accounts.VirtualAccountStatus:
      type: string
      title: VirtualAccountStatus
      enum:
        - VIRTUAL_ACCOUNT_STATUS_UNSPECIFIED
        - VIRTUAL_ACCOUNT_STATUS_PENDING
        - VIRTUAL_ACCOUNT_STATUS_ACTIVE
        - VIRTUAL_ACCOUNT_STATUS_INACTIVE
        - VIRTUAL_ACCOUNT_STATUS_FAILED
      example: VIRTUAL_ACCOUNT_STATUS_PENDING
    bastion.api.v2.conversions.DepositInstructions:
      type: object
      properties:
        amount:
          type: string
          title: amount
          description: Amount to be deposited
        currency:
          $ref: '#/components/schemas/bastion.api.v2.conversions.ConversionCurrency'
          title: currency
          description: Currency of the fiat transaction
        bank_name:
          type: string
          title: bank_name
          description: Name of the bank
        bank_address:
          type: string
          title: bank_address
          description: Address of the bank
        payment_method:
          $ref: '#/components/schemas/bastion.api.v2.conversions.PaymentMethod'
          title: payment_method
          description: Payment method for the transaction
        deposit_message:
          type: string
          title: deposit_message
          description: Deposit message
        bank_account_number:
          type: string
          title: bank_account_number
          description: Bank account number
        bank_routing_number:
          type: string
          title: bank_routing_number
          description: Bank routing number
        bank_beneficiary_name:
          type: string
          title: bank_beneficiary_name
          description: Name of the bank beneficiary
        bank_beneficiary_address:
          type: string
          title: bank_beneficiary_address
          description: Address of the bank beneficiary
      title: DepositInstructions
      additionalProperties: false
      description: Deposit instructions for on-ramp conversions.
    bastion.api.v2.conversions.PaymentMethod:
      type: string
      title: PaymentMethod
      enum:
        - PAYMENT_METHOD_UNSPECIFIED
        - BLOCKCHAIN
        - WIRE
        - SPEI
        - IMPS_FIRC
        - BANK_TRANSFER
        - SEPA
      description: Transfer mechanism for the conversion.
      example: BLOCKCHAIN
  securitySchemes:
    auth:
      type: http
      description: Bearer authentication with an API token
      scheme: bearer

````

## Related topics

- [On-ramp: Fund a stablecoin account with a USD wire](/guides/quickstarts/on-ramp.md)
- [List Virtual Accounts](/v2/api-reference/virtual-accounts/list-virtual-accounts.md)
- [Create Account](/v2/api-reference/accounts/create-account.md)
- [Stablecoin on-ramp and off-ramp conversions](/guides/concepts/stablecoin-conversions.md)
- [Create Bank Account](/v2/api-reference/issuance/create-bank-account.md)
