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

# Create Virtual Account

> Creates a temporary, customer-facing virtual bank account for bank transfer collections.

Creates a dynamic, customer-facing virtual bank account for bank transfer collections.

### Notes

* `businessId`, `amount`, `reference`, `merchantCustomerId`, and `merchantReference` are required.
* `merchantCustomerId` should match the merchant's internal user/customer ID.
* `merchantReference` should match the merchant's own order/session/invoice reference.
* Any extra mapping fields are preserved in `metadata` and echoed back in the deposit webhook.


## OpenAPI

````yaml POST /virtual-account/create
openapi: 3.0.0
info:
  title: NexaPay Business API
  version: 1.0.0
  description: Server-to-server merchant integration API documentation.
servers:
  - url: https://api.nexapay.ng/api/v1/business
    description: Production Server
security: []
tags: []
paths:
  /virtual-account/create:
    post:
      tags:
        - Transfers
      summary: Create dynamic virtual bank account
      description: >-
        Creates a temporary, customer-facing virtual bank account for bank
        transfer collections.
      parameters:
        - $ref: '#/components/parameters/BusinessEnvHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                businessId:
                  type: string
                  description: Unique business ID.
                amount:
                  type: number
                  description: Expected collection amount.
                reference:
                  type: string
                  description: Unique reference for the virtual account session.
                merchantCustomerId:
                  type: string
                  description: ID identifying the end customer.
                merchantReference:
                  type: string
                  description: Merchant reference of the collection.
                validityTime:
                  type: integer
                  description: Session validity limit in minutes (default 4320).
                amountValidation:
                  type: string
                  description: Strict or flexible amount check.
                sessionId:
                  type: string
                orderId:
                  type: string
                customerName:
                  type: string
                customerEmail:
                  type: string
                customerPhone:
                  type: string
                metadata:
                  type: object
              required:
                - businessId
                - amount
                - reference
                - merchantCustomerId
                - merchantReference
      responses:
        '200':
          description: Virtual account successfully created.
        '400':
          description: Invalid arguments.
        '502':
          description: Provider error.
      security:
        - ApiKeyAuth: []
components:
  parameters:
    BusinessEnvHeader:
      name: x-business-env
      in: header
      required: false
      schema:
        type: string
        enum:
          - prod
          - test
        default: prod
      description: Target environment selector (live production vs. simulated sandbox).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Merchant API Key (e.g., nexa-prod-... or nexa-test-...)

````