Skip to main content

Create a virtual account

Generate a unique account number for your customer to receive payment.

Update a virtual account

Update a customer virtual account name and callback URL record.

Introduction

At Nomba, virtual accounts are part of the broader Accounts system. A virtual account can be created for a customer primarily to receive payments. Once created, Nomba generates a unique account number that customers can use to receive bank transfers.

Types of accounts

Nomba supports the following account types:

Primary Accounts

A primary account is automatically created when you set up your business on Nomba.
  • This is your main account.
  • All other accounts (virtual or sub-accounts) are linked to it.

Virtual accounts

Virtual accounts are created via API for receiving payments. Funds received are automatically routed to the parent (primary) account.
  • Virtual accounts do not hold balances themselves
  • If required, virtual accounts can be linked to a sub-account instead of the primary account buy adding the subAccountId as a path to the endpoint
  • You can view all virtual account transactions on your dashboard.

Sub-accounts

Sub-accounts are created from the Nomba Dashboard
  • They act as separate “pockets” for managing funds
  • Useful for segmenting funds across teams, operations, or workflows.
See this guide for more details on managing accounts with Nomba.

Types of Virtual accounts

Nomba supports two types of virtual accounts based on their behavior:

Static Virtual Accounts

Static virtual accounts are permanent account numbers assigned to a customer or business. Use a static virtual account when:
  • You do not want the account to expire
  • You want your customers to receive multiple payments over time.
Use cases:
  • Assigning a dedicated account number to a customer
  • Supporting recurring payments
  • When you need a stable, non-expiring account number

Dynamic Virtual Accounts

Dynamic virtual accounts are temporary, purpose-specific account numbers.
  • Typically used for one-time or time-bound payments
  • Can be configured with an expiryDate to define validity
  • Dynamic accounts help reduce reconciliation errors for transaction-specific payments.

Create a virtual account

We recommend testing virtual account creation in the Sandbox environment before going live. In the Sandbox, a virtual account is created in one of two modes, set with the optional mode field:
SIMULATED (default for NGN)
  • Gets a sandbox-only account number that starts with 0. No bank is involved and no real money moves.
  • You fund it from Demo inflow, with Simulate an inflow, or with a sandbox transfer to bank code 090645.
  • There’s no limit on how many you create, and it accepts any amount.
  • expiryDate and expiring the account work as in production.
LIVE ("mode": "LIVE")
  • Each user can create a maximum of 2 live accounts; you can expire old accounts to create more.
  • Each account is created with an expectedAmount of ₦100 and accepts only that exact amount. You can update it (up to ₦150) using the expectedAmount field.
  • Transfers can be made from any Nigerian bank.
  • Virtual account expiration is not supported.
  • All inflows trigger webhooks to the Sandbox webhook URL.
  • The mode field is ignored in production.
To create a virtual account, please take note of the optional and required fields:
  • accountRef (required): A unique reference you assign to the virtual account.
  • accountName (required): The name associated with the virtual account.
  • currency (required): Currency for the virtual account, e.g NGN.
  • bvn (optional): If not provided, the virtual account will inherit the BVN of the parent account. Only include this if you want to assign a different BVN.
  • nin (optional): The account holder’s National Identification Number, exactly 11 digits. You can send it on its own instead of a bvn, or alongside bvn to record both. If you send neither, the virtual account inherits the BVN of the parent account as described above.
  • expectedAmount (optional): Restricts the account to accept only the specified amount. This is useful for exact payments such as invoice matching or controlled transfers. When omitted, the account will accept any amount since it is not restricted to a specific value.
If a sender transfers an amount different from the expectedAmount:
  • The transaction may be declined by the sender’s bank, or
  • Automatically reversed, depending on the bank’s handling logic
Be cautious when setting the expectedAmount. Once set, the account will only accept that exact amount. Payments with any other amount will be rejected.
  • mode (optional, Sandbox only): SIMULATED (the default for NGN) or LIVE. See Test the account in the Sandbox.
  • expiryDate (optional): Sets how long the virtual account remains valid, this is useful if you intend to create a dynamic virtual account purposely for time-based transactions. If omitted, the virtual account functions as a static (permanent) account.
To create a virtual account, send a POST request to this endpoint /v1/accounts/virtual.

Test the account in the Sandbox

For a SIMULATED account (the default), pay it from Demo inflow the way a customer would, or fund it with Simulate an inflow. It sends the same payment_success webhook as a real transfer, and the returned transactionRef can be used with Transaction requery.
For a LIVE account, send ₦100 to the bankAccountNumber returned above, from any Nigerian bank. To test the expected amount use case, update the account with an expectedAmount between ₦100 and ₦150, then transfer exactly that amount.

Testing virtual accounts

Full sandbox walkthrough: create a simulated or live account, simulate an inflow, and test rejected inflows.

Expire a virtual account

Expiring an account stops it accepting further payments. Use it when a customer’s account is no longer needed. For example, a dynamic account for a one-off order. To expire a virtual account, send a DELETE request to /v1/accounts/virtual/{identifier}, where identifier is the accountRef you set when creating the account or the bankAccountNumber that was returned.
Virtual accounts are the only accounts that can be created via API.

Perform a virtual account lookup

You can look up the details of a virtual account using its account number. This is useful for verifying whether an account is still valid, checking expiry status, or retrieving account details before accepting payments.
What’s Next? After creating a virtual account, there are additional actions you may need to perform: