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

# Create Reserved/Dynamic Virtual Account

> This API endpoint allows you to create dynamic virtual accounts with a duration of 30 mins and reserved/static virtual accounts that are permanent. Our virtual accounts guide can be found [here](/guides/virtual-accounts)



## OpenAPI

````yaml /openapi.json post /merchant-collection/merchant/virtual_account/generate_virtual_account
openapi: 3.0.1
info:
  title: Payaza Documentation
  version: 2.0.0
  description: >-
    API reference for processing payments using Card, Bank Transfer, USSD, and
    QR Code methods.
servers:
  - url: https://api.payaza.africa/live
security:
  - ApiKeyAuth: []
  - TenantID: []
  - ProductID: []
tags:
  - name: Transfers
    description: >-
      Transfers are transactions made from your Payaza account to beneficiaries.
      Merchants can instantly transfer funds from their available balance. For
      every transfer, you need to specify the amount and the beneficiary’s
      details. You become eligible to make transfers after you have been
      verified. (you sign up, finish account activation and KYC verification).
  - name: Payaza Account
    description: >-
      This is our internal account that can be used to make payouts to other
      bank accounts, in single or in bulk. The Payaza account can also be used
      to receive settlements. It can also be used to track the transfer status
      of your transactions and check your balance instantly
  - name: Sub Accounts
    description: >-
      This enables you to establish Sub Payaza accounts for your customers. Each
      sub-account comes with an assigned static virtual account, facilitating
      direct funding for individual accounts. Furthermore, the Main Payaza
      account can directly initiate funding for each sub-account. These
      sub-accounts serve the purpose of managing unique account positions or
      balances and facilitating disbursements from these positions to specified
      beneficiaries.
  - name: EUR Accounts
    description: >-
      This endpoints enable you to create EUR subaccounts which can be used to
      make transfers as required .
  - name: Apple Pay and Google Pay
    description: >-
      Apple Pay and Google Pay give your customers a fast, familiar, and secure
      way to complete payments. Our APIs provide a gateway to provide these
      services to your users for a smooth payment experience.
  - name: Virtual Accounts
    description: >-
      Virtual Accounts are bank accounts that are created for a specific purpose
      and last for specified durations. Virtual accounts are issued by Payaza’s
      partner banks. Our virtual account APIs can be used to create virtual
      accounts and perform other tasks relevant to virtual accounts. Virtual
      accounts are created to foster easy payment collections for your business
      and platform. 

      Static/Reserved Account: This virtual account is created by the merchant
      and remains valid indefinitely. It can be used multiple times and does not
      expire. 

      Dynamic Account: This virtual account is generated for a specific
      transaction or purpose. Please note that dynamic virtual account remains
      valid for a temporary period of time or until a payment of the specified
      amount is received. Upon expiry, a merchant can generate another one for a
      different purpose.
  - name: Card Collection
    description: >-
      The Card Collection APIs can be used to make card transactions, refund
      transactions that have been performed, check the status of a transaction
      and so much more.
  - name: Card Tokenisation
    description: >-
      The Card Tokenisation APIs are used to create card tokens, charge cards
      using tokens, retrieve all tokens created by a merchant account and
      deleting any card token as desired.
  - name: Refunds And Chargebacks
    description: >-
      The Refunds and Chargeback APIs are used to initiate refunds, view your
      refund and chargeback history and so much more.
  - name: Branches
    description: >-
      The Refunds and Chargeback APIs are used to initiate refunds, view your
      refund and chargeback history and so much more.
  - name: Auth-Capture-Void
    description: >-
      The Auth-Capture-Void APIs provide a two-phase payment process where
      transactions are first authorized, then captured or voided. This allows
      merchants to hold funds and complete the transaction in the future.
  - name: Momo and ZAR Collections
    description: APIs for MoMo, ZAR and XOF collections.
  - name: Check Transaction Status(Merchant Reference)
    description: >-
      This endpoint is used to check the transaction status of a transaction
      using the Merchant Reference..
paths:
  /merchant-collection/merchant/virtual_account/generate_virtual_account:
    post:
      tags:
        - Virtual Accounts
      summary: Create Reserved/Dynamic Virtual Account
      description: >-
        This API endpoint allows you to create dynamic virtual accounts with a
        duration of 30 mins and reserved/static virtual accounts that are
        permanent. Our virtual accounts guide can be found
        [here](/guides/virtual-accounts)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/createDynamicAccountRequest'
                - $ref: '#/components/schemas/createReservedAccountRequest'
            examples:
              Dynamic Virtual Account:
                summary: Dynamic Virtual Account
                value:
                  account_name: Test DVA
                  account_type: Dynamic
                  bank_code: '140'
                  bvn: ''
                  has_amount_validation: 'true'
                  account_reference: Ref123456780
                  customer_first_name: John
                  customer_last_name: Doe
                  customer_email: johndoe@gmail.com
                  customer_phone_number: '07012345678'
                  transaction_description: Test Description
                  transaction_amount: '1000'
                  expires_in_minutes: '20'
              Reserved Virtual Account:
                summary: Reserved Virtual Account
                value:
                  account_name: Test Reserved VA
                  account_type: Static
                  bank_code: '140'
                  bvn: '3232123454'
                  bvn_validated: true
                  account_reference: accRef123
                  customer_first_name: John
                  customer_last_name: Doe
                  customer_email: johndoe@gmail.com
                  customer_phone_number: '07012345678'
      responses:
        '200':
          description: Transfer initiated successfully
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/createDynamicAccountResponse'
                  - $ref: '#/components/schemas/createReservedAccountResponse'
              examples:
                Dynamic Virtual Account:
                  summary: Success Response
                  value:
                    message: Virtual Account generated successfully
                    data:
                      account_name: Payaza(Test DVA)
                      account_number: '3340009013'
                      account_type: Dynamic
                      bank_name: GLOBUS BANK
                      account_reference: accRef123
                      account_expired: false
                      message: Virtual Account generated successfully
                      transaction_id: 49555930
                      transaction_amount_payable: 100
                      transaction_reference: accRef123
                      expires_in_minutes: 20
                    success: true
                Reserved Virtual Account:
                  summary: Success Response
                  value:
                    message: Virtual Account generated successfully
                    data:
                      account_name: Payaza(Test Reserved VA)
                      account_number: '3330772330'
                      account_type: Static
                      bank_name: GLOBUS BANK
                      account_reference: accRef123
                      account_expired: false
                      message: Virtual Account generated successfully
                    success: true
        '400':
          description: Invalid request
      security:
        - ApiKeyAuth: []
components:
  schemas:
    createDynamicAccountRequest:
      title: Create Dynamic Virtual Account Request
      type: object
      required:
        - account_name
        - account_type
        - bank_code
        - account_reference
        - customer_first_name
        - customer_last_name
        - customer_email
        - transaction_amount
      properties:
        account_name:
          type: string
          description: The name assigned to the virtual account being created.
          example: Test DVA
        account_type:
          type: string
          description: Type of virtual account. **“Dynamic‶** is the default value
          example: Dynamic
        bank_code:
          type: string
          description: |-
            The code of the bank providing the virtual account. 
            **“1067‶** for 78 FINANCE COMPANY LIMITED, 
            **“117‶** for FIDELITY BANK LIMITED, 
             **“140‶** for GLOBUS BANK LIMITED.
          example: '140'
        has_amount_validation:
          type: string
          description: >-
            This is used to give control on amount validation for virtual
            accounts being created i.e. allow underpayment or overpayment or
            exact amounts. 

            This is only available for **GLOBUS BANK LIMITED** and **78 FINANCE
            COMPANY LIMITED**.
          example: 'true'
        account_reference:
          type: string
          description: The unique identifier for the transaction..
          example: Ref123456780
        customer_first_name:
          type: string
          description: The first name of the customer.
          example: John
        customer_last_name:
          type: string
          description: The last name of the customer.
          example: Doe
        customer_email:
          type: string
          format: email
          description: The customer's email address.
          example: johndoe@gmail.com
        customer_phone_number:
          type: string
          description: The customer's phone number.
          example: '07012345678'
        transaction_description:
          type: string
          description: The description or narration of the transaction.
          example: Test Description
        transaction_amount:
          type: string
          description: The amount to be paid in the transaction.
          example: '1000'
        expires_in_minutes:
          type: string
          description: >-
            The number of minutes for which the virtual account will be valid.
            The default is 30 minutes. Minimum: 15 minutes, Maximum: 480
            minutes. 

            This is only available for **78 FINANCE COMPANY LIMITED**.
          example: '20'
    createReservedAccountRequest:
      title: Create Static Virtual Account Request
      type: object
      required:
        - account_name
        - account_type
        - bank_code
        - bvn
        - bvn_validated
        - account_reference
        - customer_first_name
        - customer_last_name
        - customer_email
      properties:
        account_name:
          type: string
          description: The name assigned to the reserved account being created.
          example: Test Reserved VA
        account_type:
          type: string
          description: Type of virtual account. **“Static‶** is the default value
          example: Static
        bank_code:
          type: string
          description: |-
            The code of the bank providing the virtual account. 
            **“1067‶** for 78 FINANCE COMPANY LIMITED 
            **“117‶** for FIDELITY BANK LIMITED 
             **“140‶** for GLOBUS BANK LIMITED.
          example: '140'
        bvn:
          type: string
          description: Bank Verification Number (BVN) of the customer..
          example: '323212345'
        bvn_validated:
          type: boolean
          description: This indicates whether the BVN has been validated by the merchant.
          example: true
        account_reference:
          type: string
          description: The unique identifier for the account.
          example: accRef123
        customer_first_name:
          type: string
          description: The first name of the customer..
          example: John
        customer_last_name:
          type: string
          description: The last name of the customer..
          example: Doe
        customer_email:
          type: string
          format: email
          description: The email address of the customer..
          example: johndoe@gmail.com
        customer_phone_number:
          type: string
          description: The phone number of the customer.
          example: '07012345678'
    createDynamicAccountResponse:
      title: Create Dynamic Virtual Account Response
      type: object
      properties:
        success:
          type: boolean
          description: Request success status.
          example: true
        message:
          type: string
          description: Response message.
          example: Virtual Account generated successfully
        data:
          type: object
          description: Generated virtual account details.
          properties:
            account_name:
              type: string
              description: Full name on the generated account.
              example: Payaza(Test DVA)
            account_number:
              type: string
              description: The 1virtual account number.
              example: '7000009348'
            account_type:
              type: string
              description: Type of account generated (Dynamic or Static).
              example: Dynamic
            bank_name:
              type: string
              description: Name of the bank provider.
              example: 78 FINANCE COMPANY LIMITED
            account_reference:
              type: string
              description: Merchant provided reference.
              example: Ref123456780
            transaction_id:
              type: integer
              description: Unique transaction identifier.
              example: 23366137
            transaction_amount_payable:
              type: number
              description: Amount payable (if amount validation is enabled).
              example: 1000
            transaction_reference:
              type: string
              description: The unique identifier for the transaction..
              example: Ref123456780
            expires_in_minutes:
              type: integer
              description: Duration before the account expires (for dynamic accounts).
              example: 20
    createReservedAccountResponse:
      title: Create Reserved Virtual Account Response
      type: object
      properties:
        success:
          type: boolean
          description: Request success status.
          example: true
        message:
          type: string
          description: Response message.
          example: Virtual Account generated successfully
        data:
          type: object
          description: Reserve account details.
          properties:
            account_name:
              type: string
              description: The name of the reserved virtual account being created.
              example: Payaza(Test Reserved VA)
            account_number:
              type: string
              description: The virtual account number.
              example: '3330343198'
            account_type:
              type: string
              description: Type of account (Static).
              example: Static
            bank_name:
              type: string
              description: Name of the bank provider.
              example: 78 FINANCE COMPANY LIMITED
            account_reference:
              type: string
              description: The unique identifier for the account.
              example: accRef123
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Payaza {{Public API Key in Base 64}}
    TenantID:
      type: apiKey
      in: header
      name: X-TenantID
      description: live or test
    ProductID:
      type: apiKey
      in: header
      name: X-ProductID
      description: 'default value is ‟app” '

````