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

# Create Virtual Account

> Virtual account API: create a STATIC or DYNAMIC Nigerian reserved bank account for customer collections.

Create a reserved virtual bank account (STATIC or DYNAMIC). Authentication is covered in [Authentication](/api-basics/authentication).

**Example request body (STATIC):**

```json theme={null}
{
  "email": "johndoe@gmail.com",
  "name": "JOHN DOE",
  "phoneNumber": "09012345672",
  "bankcode": ["999991", "120001"],
  "account_type": "STATIC",
  "businessid": "061C074E2F91F944B93993B4",
  "bvn": "22345678901",
  "nin": "12345678901"
}
```

**Example request body (DYNAMIC):**

You can specify either Rubies MFB or 9Payment Service Bank for the dynamic account:

```json theme={null}
{
  "email": "customer@example.com",
  "name": "JANE DOE",
  "phoneNumber": "08012345678",
  "bankcode": ["090175"],
  "account_type": "DYNAMIC",
  "businessid": "061C074E2F91F944B93993B4"
}
```

or

```json theme={null}
{
  "email": "customer@example.com",
  "name": "JANE DOE",
  "phoneNumber": "08012345678",
  "bankcode": ["120001"],
  "account_type": "DYNAMIC",
  "businessid": "061C074E2F91F944B93993B4"
}
```

**Example response for Rubies MFB (DYNAMIC):**

```json theme={null}
{
  "status": true,
  "service": "CREATE_VIRTUAL_ACCOUNT",
  "business": "061C074E2F91F944B93993B4",
  "banks": {
    "bankCode": "090175",
    "bankName": "Rubies MFB",
    "accountNumber": "8880314352",
    "accountName": "Demo User",
    "account_type": "DYNAMIC",
    "expire_date": "2026-05-15T11:49:36.117753+01:00",
    "trackingReference": "XOINFKVRO90311273BD8DZZ8"
  }
}
```

**Example response for 9Payment Service Bank (DYNAMIC):**

```json theme={null}
{
  "status": true,
  "service": "CREATE_VIRTUAL_ACCOUNT",
  "business": "061C074E2F91F944B93993B4",
  "banks": {
    "bankCode": "120001",
    "bankName": "9Payment Service Bank",
    "accountNumber": "5030200545",
    "accountName": "Demo User",
    "account_type": "DYNAMIC",
    "expire_date": "2026-05-15T11:49:36.117753+01:00",
    "trackingReference": "YOINFKVRO90311273BD8DZZ9"
  }
}
```

**cURL:**

```bash theme={null}
curl -X POST "https://api.payvessel.com/pms/api/external/request/customerReservedAccount/" \
  -H "api-key: YOUR_API_KEY" \
  -H "api-secret: YOUR_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"email":"johndoe@gmail.com","name":"JOHN DOE","phoneNumber":"09012345672","bankcode":["999991","120001"],"account_type":"STATIC","businessid":"YOUR_BUSINESS_ID","bvn":"22345678901"}'
```

For concepts and when to use STATIC vs DYNAMIC, see the [Customer Reserved Account](/accept-payment/customer-reserved-account) guide.


## OpenAPI

````yaml api-reference/openapi.json POST /pms/api/external/request/customerReservedAccount/
openapi: 3.1.0
info:
  title: PayVessel API
  description: >-
    PayVessel API for accepting payments, sending money, verifying identities,
    and managing wallets
  version: 1.0.0
servers:
  - url: https://api.payvessel.com
  - url: https://sandbox.payvessel.com
security:
  - {}
paths:
  /pms/api/external/request/customerReservedAccount/:
    post:
      tags:
        - Virtual Accounts
      summary: Create Virtual Account
      description: >-
        Create a reserved virtual bank account for a customer. Each reserved
        account is unique per customer, supports static and dynamic modes, and
        triggers notifications when funded. Use static accounts for recurring
        funding and dynamic accounts for one-time payments.
      parameters:
        - name: api-key
          in: header
          description: Your Payvessel public API key
          required: true
          schema:
            type: string
        - name: api-secret
          in: header
          description: Your Payvessel secret
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Request content type
          required: true
          schema:
            type: string
            enum:
              - application/json
          example: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVirtualAccountRequest'
            examples:
              static:
                summary: Static virtual account
                value:
                  email: johndoe@gmail.com
                  name: JOHN DOE
                  phoneNumber: '09012345672'
                  bankcode:
                    - '999991'
                    - '120001'
                  account_type: STATIC
                  businessid: 061C074E2F91F944B93993B4
                  bvn: '22345678901'
                  nin: '12345678901'
      responses:
        '200':
          description: Virtual account created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVirtualAccountResponse'
        '201':
          description: Virtual account created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVirtualAccountResponse'
              examples:
                success:
                  summary: Static account created
                  value:
                    status: true
                    service: CREATE_VIRTUAL_ACCOUNT
                    business: 061C074E2F91F944B93993B4
                    banks:
                      - bankName: 9Payment Service Bank
                        accountNumber: '5030200545'
                        accountName: Payvessel-Merchant
                        account_type: STATIC
                        expire_date: '2024-01-04T11:29:32.6522498+01:00'
                        trackingReference: 40HTTGT96CDF360C3DRVGV3J
                      - bankName: PalmPay
                        accountNumber: '6030200545'
                        accountName: Payvessel-Merchant
                        account_type: STATIC
                        expire_date: '2024-01-04T11:29:32.6522498+01:00'
                        trackingReference: 50HTTGT96CDF360C3DRVGV3J
        '400':
          description: Invalid request payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVirtualAccountError'
              examples:
                validation:
                  summary: Missing required fields
                  value:
                    status: false
                    service: CREATE_VIRTUAL_ACCOUNT
                    message: Invalid payload
                    errors:
                      bankcode:
                        - At least one partner bank code is required
                      bvn:
                        - BVN is mandatory for STATIC accounts
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  summary: Invalid credentials
                  value:
                    error: 401
                    message: Unauthorized. Please check your API key.
        '403':
          description: Forbidden request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Endpoint not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateVirtualAccountRequest:
      type: object
      required:
        - email
        - name
        - phoneNumber
        - bankcode
        - account_type
        - businessid
      properties:
        email:
          type: string
          format: email
          description: Customer email address
        name:
          type: string
          description: Customer full name (first name and last name)
        phoneNumber:
          type: string
          description: Customer phone number in international format
        bankcode:
          type: array
          description: List of partner bank codes to provision the virtual account with
          items:
            type: string
            enum:
              - '999991'
              - '120001'
          example:
            - '999991'
            - '120001'
        account_type:
          type: string
          description: Type of virtual account to create
          enum:
            - STATIC
            - DYNAMIC
        businessid:
          type: string
          description: Merchant business ID supplied by Payvessel
        bvn:
          type: string
          description: Customer Bank Verification Number (required for STATIC accounts)
        nin:
          type: string
          description: >-
            Customer National Identification Number (use when BVN is
            unavailable)
    CreateVirtualAccountResponse:
      type: object
      required:
        - status
        - service
        - business
        - banks
      properties:
        status:
          type: boolean
          description: Indicates whether the request succeeded
        service:
          type: string
          description: Operation identifier
          example: CREATE_VIRTUAL_ACCOUNT
        business:
          type: string
          description: Merchant business ID
        banks:
          type: array
          description: Generated virtual bank accounts
          items:
            $ref: '#/components/schemas/VirtualAccountBank'
    CreateVirtualAccountError:
      type: object
      required:
        - status
        - service
        - message
        - errors
      properties:
        status:
          type: boolean
          description: Request outcome flag
          example: false
        service:
          type: string
          description: Operation identifier
          example: CREATE_VIRTUAL_ACCOUNT
        message:
          type: string
          description: Error summary
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Validation errors keyed by field name
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    VirtualAccountBank:
      type: object
      required:
        - bankName
        - accountNumber
        - accountName
        - account_type
        - trackingReference
      properties:
        bankName:
          type: string
          description: Name of partner bank
        accountNumber:
          type: string
          description: Account number assigned to the customer
        accountName:
          type: string
          description: Account display name
        account_type:
          type: string
          description: Virtual account type
          enum:
            - STATIC
            - DYNAMIC
        expire_date:
          type: string
          format: date-time
          description: Expiration timestamp (dynamic accounts only)
        trackingReference:
          type: string
          description: Reference used to track transactions on this account

````