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

# Get Virtual Accounts

> Retrieve virtual accounts for a user



## OpenAPI

````yaml /openapi/embedded-payments.yaml get /v1/users/{userId}/virtual-accounts
openapi: 3.0.0
info:
  description: APIs for interacting with Cadana Global Payments
  version: 1.0.0
  title: Embedded Payments
  termsOfService: https://cadanapay.com/terms-and-conditions
  contact:
    email: api@cadanapay.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.cadanapay.com
    description: Prod Server
  - url: https://dev-api.cadanapay.com
    description: Dev Server
security:
  - Authorization: []
tags:
  - name: Beneficiaries
    description: APIs for managing beneficiaries
  - name: Payouts
    description: APIs for managing payouts
  - name: Balances
    description: APIs for managing account balances
  - name: FX
    description: APIs for managing foreign exchange rates
  - name: Resources
    description: Resource APIs to access and manage foundational data
  - name: Virtual Accounts
    description: APIs for managing virtual accounts
paths:
  /v1/users/{userId}/virtual-accounts:
    get:
      tags:
        - Virtual Accounts
      summary: Get Virtual Accounts
      description: Retrieve virtual accounts for a user
      parameters:
        - $ref: '#/components/parameters/userId'
        - $ref: '#/components/parameters/XMultiTenantKey'
      responses:
        '200':
          $ref: '#/components/responses/GetVirtualAccountsResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        5XX:
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    userId:
      name: userId
      in: path
      description: The unique identifier for the user
      required: true
      schema:
        type: string
        format: uuid
        example: c06f3427-3bbe-4d70-9a54-28acda267e48
    XMultiTenantKey:
      name: X-MultiTenantKey
      in: header
      required: false
      schema:
        type: string
      description: >-
        Required when using a Platform API token. The tenant key identifying
        which business to operate on.
  responses:
    GetVirtualAccountsResponse:
      description: Virtual accounts retrieved successfully
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                nullable: true
                items:
                  $ref: '#/components/schemas/VirtualAccount'
              node:
                $ref: '#/components/schemas/node'
          examples:
            requested:
              summary: Virtual account in requested status
              value:
                data:
                  - id: 3f70be8e-426f-4e89-b883-9c97a1c334d5
                    status: Requested
                    currency: USD
                    createdTimestamp: 1755693297
                    lastUpdatedTimestamp: 1755693297
                node:
                  previous: null
                  next: null
            approved:
              summary: Virtual account in approved status with account information
              value:
                data:
                  - id: dba72ddb-6bb5-465b-a9db-318b8f4567e6
                    status: Approved
                    currency: USD
                    accountInformation:
                      accountNumber: '000000000000'
                      accountName: John Doe
                      bankName: Example Bank
                      bankCode: '000000000'
                      countryCode: US
                      accountType: Checking
                      routingNumber: '000000000'
                      bankAddress: 123 Main St, San Francisco, CA 94100
                    createdTimestamp: 1660722175
                    lastUpdatedTimestamp: 1751891253
                node:
                  previous: null
                  next: null
            empty:
              summary: No virtual accounts exist
              value:
                data: null
                node:
                  previous: null
                  next: null
    BadRequestError:
      description: Bad input provided by client
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequestError'
    InternalError:
      description: Internal error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalError'
  schemas:
    VirtualAccount:
      type: object
      required:
        - id
        - status
        - currency
        - createdTimestamp
        - lastUpdatedTimestamp
      properties:
        id:
          type: string
          format: uuid
          example: 3f70be8e-426f-4e89-b883-9c97a1c334d5
        status:
          type: string
          enum:
            - Requested
            - Approved
            - Rejected
            - Deactivated
          example: Requested
        currency:
          type: string
          example: USD
        accountInformation:
          $ref: '#/components/schemas/AccountInformation'
        createdTimestamp:
          type: integer
          description: Unix timestamp when the virtual account was created
          example: 1755693297
        lastUpdatedTimestamp:
          type: integer
          description: Unix timestamp when the virtual account was last updated
          example: 1755693297
    node:
      type: object
      description: Node pagination
      properties:
        previous:
          type: string
          nullable: true
          example: null
        next:
          type: string
          nullable: true
          example: ca_123
    BadRequestError:
      description: Bad input provided by client
      allOf:
        - $ref: '#/components/schemas/Error'
        - type: object
          properties:
            params:
              description: A map for meta data around the error that occurred
              type: object
      example:
        code: invalid_request_body
        message: The request body provided is not valid
        params:
          field: Value is invalid.
    InternalError:
      description: Internal server error
      allOf:
        - $ref: '#/components/schemas/Error'
      example:
        code: internal_error
        message: An unexpected error occurred. Please try again later.
    AccountInformation:
      type: object
      required:
        - accountNumber
        - accountName
        - bankName
        - bankCode
        - countryCode
        - accountType
        - routingNumber
        - bankAddress
      properties:
        accountNumber:
          type: string
          description: The virtual account number
          example: '000000000000'
        accountName:
          type: string
          description: The name on the account
          example: John Doe
        bankName:
          type: string
          description: The name of the bank
          example: Example Bank
        bankCode:
          type: string
          description: The bank identification code
          example: '000000000'
        countryCode:
          type: string
          description: ISO 3166-1 alpha-2 country code
          example: US
        accountType:
          type: string
          enum:
            - Checking
            - Savings
          description: The type of account
          example: Checking
        routingNumber:
          type: string
          description: The routing number for the account
          example: '000000000'
        bankAddress:
          type: string
          description: The address of the bank
          example: 123 Main St, San Francisco, CA 94100
    Error:
      type: object
      properties:
        code:
          description: A machine parsable error code
          type: string
          enum:
            - invalid_request_body
            - resource_not_found
            - forbidden
            - internal_error
        message:
          description: A human readable message describing the error
          type: string
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      bearerFormat: API_SECRET_KEY

````