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

# Create Virtual Account

> Use this API to create a virtual account that helps streamline the management of funds, enhance tracking capabilities, and simplify the financial process.



## OpenAPI

````yaml post /fundsources/connected/virtual-account
openapi: 3.0.0
info:
  title: Internal Transfer API
  version: 1.0.0
  description: API to create virtual accounts on existing connected fund sources.
servers:
  - url: https://sandbox.cashfree.com/payout
    description: Sandbox server
  - url: https://api.cashfree.com/payout
    description: Production server
security: []
tags: []
paths:
  /fundsources/connected/virtual-account:
    post:
      summary: Create Virtual Account
      description: >-
        Use this API to create a virtual account that helps streamline the
        management of funds, enhance tracking capabilities, and simplify the
        financial process.
      operationId: createVirtualAccount
      requestBody:
        description: Find the request parameters to create the virtual account
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVirtualAccountRequest'
      responses:
        '200':
          description: Virtual account successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
              examples:
                success:
                  value:
                    status: SUCCESS
                    subCode: '200'
                    message: Virtual account created
                    data:
                      paymentInstrumentId: KOTAKCR_CONNECTED_376933_9e478d1
                      virtualAccountNumber: 90909010KR0M
        '201':
          description: Virtual account successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
              examples:
                success:
                  value:
                    status: SUCCESS
                    subCode: '201'
                    message: Virtual account created
                    data:
                      paymentInstrumentId: KOTAKCR_CONNECTED_376933_9e478d1
                      virtualAccountNumber: 90909010KR0M
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
              examples:
                error:
                  value:
                    status: ERROR
                    subCode: '400'
                    message: Bad request
        '406':
          description: Virtual account creation is not allowed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
              examples:
                error:
                  value:
                    status: ERROR
                    subCode: '406'
                    message: Virtual account creation is not allowed
        '412':
          description: Precondition failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
              examples:
                errorActiveNotExist:
                  value:
                    status: ERROR
                    subCode: '412'
                    message: Active main escrow connected fundSource does not exist
                errorMultipleActive:
                  value:
                    status: ERROR
                    subCode: '412'
                    message: More than one active main escrow connected fundsource.
        '422':
          description: Unprocessable entity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
              examples:
                error:
                  value:
                    status: ERROR
                    subCode: '422'
                    message: Please provide a valid displayName
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayoutResponse'
              examples:
                error:
                  value:
                    status: ERROR
                    subCode: '500'
                    message: Internal server error
components:
  schemas:
    CreateVirtualAccountRequest:
      type: object
      properties:
        displayName:
          type: string
          description: It is the name you want to display for the virtual account.
          example: Demo1
        accountPrefix:
          type: string
          description: >-
            It is the account prefix as allocated by the bank. This paramete is
            mandatory during the first account creation.
          example: 1234
      required:
        - displayName
    PayoutResponse:
      type: object
      properties:
        status:
          type: string
          description: It displays the status of the request (SUCCESS/FAILURE).
          example: SUCCESS
        subCode:
          type: string
          description: It displays the sub code of the request.
          example: '200'
        message:
          type: string
          description: It displays the outcome of the request.
          example: FundSource Details Retrieved
        data:
          $ref: '#/components/schemas/FundSourceData'
          type: object
          description: Response data.
          oneOf:
            - $ref: '#/components/schemas/CreateVirtualAccountResponse'
            - $ref: '#/components/schemas/InternalTransferResponse'
    FundSourceData:
      type: object
      properties:
        id:
          type: integer
          description: It displays the unique ID of the fund source.
          example: 123
        fsDisplayType:
          type: string
          description: It displays the type of the fund source.
          example: Bank Account
        fsDescription:
          type: string
          nullable: true
          description: It displays the description of the fund source.
          example: Main operational account
        accountHolderName:
          type: string
          description: It displays the name of the account holder.
          example: John Doe
        bankName:
          type: string
          description: It displays the bank name.
          example: Bank of India
        balance:
          type: string
          format: decimal
          description: It displays the balance amount in the fund source.
          example: '1000.00'
        availableBalance:
          type: string
          format: decimal
          description: It displays the available balance amount in the fund source.
          example: '950.00'
        fundsOnHold:
          type: string
          description: It displays the amount on hold in the fund source.
          format: decimal
          example: '50.00'
        overdraft:
          type: string
          format: decimal
          description: It displays the overdraft amount of the fund source.
          example: '0.00'
        bankAccount:
          type: string
          description: It displays the bank account information of the fund source.
          example: '1234567890'
        ifsc:
          type: string
          description: It displays the IFSC information.
          example: BOFA0XXXXXX
        addedOn:
          type: string
          description: It displays the date and time of the fund source when added.
          format: date-time
          example: '2024-01-01T12:00:00Z'
        updatedOn:
          type: string
          description: It displays the latest updation date and time of the fund source.
          format: date-time
          example: '2024-08-01T12:00:00Z'
        fsName:
          type: string
          description: It displays the name of the fund source.
          example: Operational Account
        displayName:
          type: string
          description: It displays the display name of the fund source.
          example: Main Account
        virtualAccount:
          type: string
          description: It displays the virtual account information.
          example: VA1234567890
        status:
          type: string
          description: It displays the status of the fund source.
          example: ACTIVE

````