NGN Virtual Accounts
Learn how to create and manage a Nigerian Virtual Account.
NGN virtual accounts are available to Nigerian merchants by default. Merchants based outside Nigeria can request access by contacting [email protected].
Virtual accounts are generated bank account details (account number and bank name) that allow you to receive NGN payments from customers via bank transfer.
You can create two types of virtual accounts:
- Dynamic Virtual Accounts
- Static Virtual Accounts
We recommend starting with the introduction to understand the fundamentals before proceeding.
Creating a Dynamic Virtual Account
To create a dynamic virtual account, send a request to the create virtual account endpoint with an amount greater than zero and the customer's email.
curl --request POST 'https://api.flutterwave.com/v3/virtual-account-numbers' \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "[email protected]",
"amount": 100,
"tx_ref": "apex_tx-002201",
"narration": "Eriks Goods",
"bank_code":"090567"
}'By default, a dynamic virtual account expires one hour after creation. You can specify a different expiry duration using the expires parameter. See the API reference for the parameter details and supported range.
You'll get a response similar to this:
{
"status": "success",
"message": "Virtual account created",
"data": {
"response_code": "02",
"response_message": "Transaction in progress",
"flw_ref": "RRYJ0814179371189765914569",
"order_ref": "URF_1793711896595_3392635",
"account_number": "9627485714",
"frequency": "N/A",
"bank_name": "Flutterwave MFB (Formerly OK MFB)",
"created_at": "2026-11-03 14:18:17",
"expiry_date": "2026-11-03 15:18:17",
"note": "Please make a bank transfer to Eriks Goods",
"amount": "100.00"
}
}A successful response returns a response_code of 02 and response_message of "Transaction in progress". The response includes the virtual account's bank name and account number. Provide these details to the customer to make the payment.
Customers should complete the payment before the account's expiry_date. After the payment is completed, Flutterwave sends a webhook with the transaction status.
Creating a Static Virtual Account
To create a static NGN virtual account, you need the customer's NIN or BVN.
You can create a static virtual account using the same create virtual account endpoint, which is supported in our backend SDKs. Provide the customer's email, bvn or nin, and set is_permanent to true.
curl --request POST 'https://api.flutterwave.com/v3/virtual-account-numbers' \
--header 'Authorization: Bearer YOUR_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "[email protected]",
"tx_ref": "apex_tx_ref-002201",
"is_permanent": true,
"bvn": "12345678901",
"narration":"Eriks Foundation",
"bank_code":"090567"
}'
// Install with: composer require flutterwavedev/flutterwave-v3
$flw = new \Flutterwave\Rave(getenv('FLW_SECRET_KEY')); // Set `PUBLIC_KEY` as an environment variable
$virtualAccountsService = new \Flutterwave\VirtualAccount();
$details = [
"email" => "[email protected]",
"tx_ref" =>"apex_tx_ref-002201",
"phonenumber" => "08100000000",
"is_permanent" => true,
"firstname" =>"Flutterwave",
"lastname" => "Developers",
"narration" =>"Kids Foundation",
"bvn" => "1234567890"
];
$response = $virtualAccountsService->createVirtualAccount($details);# Install with: pip install rave_python
import os
from rave_python import Rave
rave = Rave(os.getenv("FLW_PUBLIC_KEY"), os.getenv("FLW_SECRET_KEY"))
res = rave.VirtualAccount.create({
"email": "[email protected]",
"tx_ref":"apex_tx_ref-002201",
"phonenumber":"08100000000",
"is_permanent": true,
"firstname":"Flutterwave",
"lastname":"Developers",
"narration":"Kids Foundation",
"bvn": "1234567890"
})
print(res)See the API reference for the available parameters.
On a successful request, you'll get a response similar to this:
{
"status": "success",
"message": "Virtual account created",
"data": {
"response_code": "02",
"response_message": "Transaction in progress",
"flw_ref": "XRZL7442179371235955914964",
"order_ref": "URF_1793712358462_5615435",
"account_number": "9751066462",
"bank_name": "Flutterwave MFB (Formerly OK MFB)",
"created_at": "2026-11-03 14:25:59",
"expiry_date": "N/A",
"note": "Please make a bank transfer to Eriks Foundation",
"amount": "0.00"
}
}
Handling Underpayments and OverpaymentsWhen customers pays less than the transaction amount to the virtual account, the transfer is automatically reversed. If they pay more than the transaction amount, the extra amount is reversed after the processing the transaction amount.
Virtual Account Webhooks
When a payment to a virtual account is completed, we'll send you a webhook that looks like this:
{
"event": "charge.completed",
"data": {
"id": 2028146660,
"tx_ref": "UNIQUE_TRANChgTdlIfONff_REFERENCE",
"flw_ref": "100004260420103413157701995493",
"device_fingerprint": "N/A",
"amount": 100,
"currency": "NGN",
"charged_amount": 102,
"app_fee": 2,
"merchant_fee": 0,
"processor_response": "success",
"auth_model": "AUTH",
"ip": "::ffff:54.154.184.168",
"narration": "FOR TESTING PURPOSE",
"status": "successful",
"payment_type": "bank_transfer",
"created_at": "2026-04-20T10:34:22.000Z",
"account_id": 96753,
"customer": {
"id": 1334422040,
"name": "Flutterwave Developers",
"phone_number": "08012345678",
"email": "[email protected]",
"created_at": "2026-04-16T21:31:36.000Z"
}
},
"meta_data": {
"originatorname": "ADEDOTUN OBATOMI",
"bankname": "OPAY",
"bankcode": "100004",
"originatoramount": "N/A",
"originatoraccountnumber": "813*******00"
},
"event.type": "BANK_TRANSFER_TRANSACTION"
}
How to Retrieve the Session ID.The
session_idused to reconcile transactions is returned in webhooks as theflw_ref. Store this value in your database alongside your internal transaction records.
Your webhook handler can use the event to process the payment and credit the customer's wallet. For help setting up webhooks, see our webhooks guide.
Creating Bulk Virtual Accounts.
You can create multiple static or dynamic virtual accounts in a single request. This is useful when managing a large customer base or streamlining payment collections.
To create bulk virtual accounts, make a POST request to the bulk virtual account endpoint with:
- batch_ref(optional): A unique reference to identify the batch.
- narration (optional): Provides context or the reason for the request.
- bulk_data(required): A list containing virtual account details for each customer:
- firstname: Customer's first name.
- lastname: Customer's last name.
- email: Customer's email address.
- amount: The amount to collect, required for creating a dynamic virtual account.
- bvn or nin: Customer's Bank Verification Number or National Identification Number. Required for creating a static virtual account.
- is_permanent: Set to true to create a static virtual account or false to create a dynamic virtual account.
curl -X POST 'https://api.flutterwave.com/v3/bulk-virtual-account-numbers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer FLWSECK_TEST-XXXXXXXXXXXXXXXXXXXXXXXXXX-X' \
--data-raw '{
"batch_ref": "Bulk-VA-RWIESDP1",
"narration": "Subscription Accounts 2026-09-14",
"bulk_data": [
{
"bvn": "12345678912",
"firstname": "Jane",
"lastname": "Doe",
"email": "[email protected]",
"is_permanent": true
},
{
"bvn": "12345678912",
"email": "[email protected]",
"firstname": "John",
"lastname": "Doe",
"is_permanent": true
}
]
}
'
On a successful request, the response includes:
- batch_id: A unique identifier for the batch. Use this to retrieve the generated virtual accounts.
- response_code: Indicates whether the request was acknowledged. This should return "
02". - response_message: Confirms that the request will be processed.
{
"status": "success",
"message": "Bulk virtual accounts creation queued",
"data": {
"batch_id": "-RND_4651739890196713",
"response_code": "02",
"response_message": "Request added to Queue"
}
}Bulk virtual account creation is processed asynchronously. Wait about 1–2 minutes for the accounts to be generated before retrieving them.
To retrieve the newly created virtual accounts, pass the batch_id returned from the bulk request as a path parameter to the get bulk account endpoint.
curl --request GET 'https://api.flutterwave.com/v3/bulk-virtual-account-numbers/-RND_4651739890196713' \
--header 'Authorization: Bearer YOUR_SECRET_KEY'You'll get a response similar to this:
{
"status": "success",
"message": "Bulk virtual accounts fetched",
"data": {
"virtual_accounts": [
{
"response_code": "02",
"response_message": "Transaction in progress",
"flw_ref": "XDBV7667178939593613672810",
"order_ref": "URF_1789395935162_3949935",
"account_number": "9978682607",
"frequency": "N/A",
"bank_name": "Flutterwave MFB (Formerly OK MFB)",
"created_at": "2026-09-14 15:25:36",
"expiry_date": "N/A",
"note": "Please make a bank transfer to Jane Doe FLW",
"amount": "0.00"
},
{
"response_code": "02",
"response_message": "Transaction in progress",
"flw_ref": "HQPH8351178939593633171852",
"order_ref": "URF_1789395935379_510535",
"account_number": "9931575690",
"frequency": "N/A",
"bank_name": "Flutterwave MFB (Formerly OK MFB)",
"created_at": "2026-09-14 15:25:36",
"expiry_date": "N/A",
"note": "Please make a bank transfer to John Doe FLW",
"amount": "0.00"
}
]
}
}
Updated 21 days ago
