> ## 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.

# Create Virtual Account

> Create a new virtual account for a user



## OpenAPI

````yaml /openapi/embedded-payments.yaml post /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:
    post:
      tags:
        - Virtual Accounts
      summary: Create Virtual Account
      description: Create a new virtual account for a user
      parameters:
        - $ref: '#/components/parameters/userId'
        - $ref: '#/components/parameters/XMultiTenantKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVirtualAccountRequest'
            examples:
              virtualAccountRequest:
                summary: >-
                  Example virtual account creation request. Use `99999900` as
                  customIdentification.number for automatic account creation
                value:
                  currency: USD
                  customIdentification:
                    type: ssn
                    number: 123-45-6789
                  jobInformation:
                    employerName: Acme Corp
                    address:
                      line1: 123 Main St
                      city: Anytown
                      postalCode: '12345'
                      state: CA
                      countryCode: US
                    employerWebsite: ''
                    title: Software Engineer
                    type: full-time
                    netPay:
                      amount: 10000
                      currency: USD
                    frequency: monthly
                    contractStartDate: '2021-01-01'
                    contractEndDate: '2025-05-06'
                  suppressNotification: true
      responses:
        '204':
          description: Successful operation
        '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.
  schemas:
    CreateVirtualAccountRequest:
      type: object
      required:
        - currency
        - jobInformation
      properties:
        currency:
          type: string
          description: ISO 4217 currency code for the virtual account
          example: USD
        customIdentification:
          $ref: '#/components/schemas/CustomIdentification'
        jobInformation:
          $ref: '#/components/schemas/JobInformation'
        suppressNotification:
          type: boolean
          description: >-
            Whether to suppress notifications for this virtual account, defaults
            to false
          example: true
    CustomIdentification:
      type: object
      required:
        - type
        - number
      properties:
        type:
          type: string
          enum:
            - ssn
            - bvn
          description: Type of identification
          example: ssn
        number:
          type: string
          description: The identification number
          example: 123-45-6789
    JobInformation:
      type: object
      required:
        - employerName
        - address
        - title
        - type
        - netPay
        - frequency
        - contractStartDate
      properties:
        employerName:
          type: string
          description: Name of the employer
          example: Tesla
        address:
          $ref: '#/components/schemas/address'
        employerWebsite:
          type: string
          description: Website of the employer (optional)
          example: ''
        title:
          type: string
          description: Job title
          example: Software Engineer
        type:
          type: string
          enum:
            - contract
            - full-time
            - part-time
          description: Type of employment
          example: full-time
        netPay:
          $ref: '#/components/schemas/Amount'
        frequency:
          type: string
          enum:
            - weekly
            - daily
            - monthly
            - hourly
          description: Payment frequency
          example: monthly
        contractStartDate:
          type: string
          format: date
          description: Start date of the contract
          example: '2021-01-01'
        contractEndDate:
          type: string
          format: date
          description: End date of the contract (optional)
          example: '2025-05-06'
    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.
    address:
      type: object
      required:
        - line1
        - city
        - postalCode
        - state
        - countryCode
      properties:
        line1:
          type: string
          description: Address line 1
          example: Lane 1
        line2:
          type: string
          description: Address line 2
          example: Apt 1
        city:
          type: string
          description: The city of the address
          example: Gotham City
        postalCode:
          type: string
          description: The postal code
          example: '10001'
        state:
          type: string
          description: The state for the address
          example: NY
        countryCode:
          type: string
          description: ISO 3166-1 alpha-2 country code
          example: US
    Amount:
      type: object
      required:
        - amount
        - currency
      properties:
        amount:
          type: integer
          description: Value in lowest denomination of the currency (e.g., cents)
          example: 100000
        currency:
          type: string
          description: ISO 4217 currency code
          example: COP
    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
  responses:
    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'
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer
      bearerFormat: API_SECRET_KEY

````