Virtual Accounts
Create Virtual Account

Virtual Account API

The Virtual Account API allows merchants to create a virtual account numbers for their customers to enable them carry out transactions.


Requirements

To use this endpoint, ensure that:

  • Your API key is active and IP whitelisting is correctly configured.

  • The user has a valid BVN (Bank Verification Number).

  • You provide a unique reference value per request.

Endpoint

POST {{baseURL}}/v1/virtual-account


Headers

HeaderTypeDescriptionRequired
Content-TypeStringMust be application/json✅ Yes
x-api-keyStringAPI key for authentication✅ Yes

Sample cURL Request

 
curl --location '{{baseURL}}/v1/virtual-account' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY_HERE \
--data-raw '{
    "currency": "NGN",
    "country": "NG",
    "firstName": "Jumoke",
    "lastName": "Dumebi",
    "email": "example@email.com",
    "phoneNumber": "+23481345XXXX",
    "bvn": "{{bvn}}",
    "reference": "0000659750629287231102XXXXXX",
    "accountName": "Jumoke Dumebi"
}'
 

Request Body

FieldTypeDescriptionRequired
currencyStringCurrency code (e.g., NGN)✅ Yes
countryStringCountry code (e.g., NG)✅ Yes
firstNameStringCustomer's first name✅ Yes
lastNameStringCustomer's last name✅ Yes
emailStringCustomer's email address✅ Yes
phoneNumberStringCustomer's phone number✅ Yes
bvnStringBank Verification Number✅ Yes
referenceStringUnique 30 number reference for the request✅ Yes
accountNameStringAccount name for the virtual account✅ Yes

Responses

If the request is successful, the API returns the following JSON response:

response.json
{
"message": "virtual account created successfully",
"status": "success",
"data": {
    "id": "e21f7365-4fc9-4669-a9d9-xxxxxxxxxxxxx",
    "firstName": "Jumoke",
    "lastName": "Dumebi",
    "email": "example@email.com",
    "phoneNumber": "+234813456XXXXX",
    "bvn": "********",
    "reference": "000065975062928723110XXXXXXXXXX",
    "account": {
        "name": "Jumoke Dumebi",
        "bankName": "Mock BANK",
        "sortCode": null,
        "number": "881725XXXXX"
    },
    "status": "ACTIVE",
    "currency": "NGN",
    "country": "NG",
    "created": "2025-05-15T13:39:57.405491181"
}
}

Response Breakdown

General Information

This section describes the high-level response fields present in every API response, regardless of the operation outcome.

FieldTypeDescription
messageStringHuman-readable message describing the result of the API call.
statusStringThe outcome of the API call. Typically "success" or "error".

Virtual Account Data

FieldTypeDescription
idStringUnique identifier for the virtual account resource.
firstNameStringFirst name of the virtual account.
lastNameStringLast name of the virtual account holder.
emailStringEmail address associated with the account holder.
phoneNumberStringPhone number of the account holder
bvnStringBank Verification Number, masked for security purposes.
referenceStringA unique reference string passed during account creation for traceability.
account.nameStringName on the generated virtual account.
account.bankNameStringName of the financial institution providing the virtual account.
account.sortCodeStringSort code of the bank
account.numberStringThe virtual account number assigned to the user.
statusStringCurrent status of the virtual account (e.g., ACTIVE, INACTIVE).
currencyStringCurrency code for transactions.
countryStringISO 3166-1 alpha-2 country code (e.g., NG for Nigeria).
createdStringISO 8601 formatted timestamp indicating when the virtual account was created.

Virtual Account Collection Webhook

Virtual account creation does not trigger a webhook. However, incoming payments to the account do.

When a payment is successfully made into a virtual account, it will trigger the virtualaccount.completed webhook event. If a payment to the virtual account fails, it will trigger the virtualaccount.failed webhook event.

  • Example: virtualaccount.completed Payload
    {
  "event": "virtualaccount.completed",
  "data": {
    "id": "7bcae5c0-8038-430a-86c4-xxxxxxxxxxxxx",
    "referenceNumber": "TCECWJXXXXX",
    "amount": 200,
    "type": "FUNDING",
    "state": "COMPLETED",
    "destination": "NGN wallet",
    "source": {
      "bankName": "Opay",
      "accountName": "JUSTIN DOE",
      "accountNumber": "81725818XX"
    },
    "customer": {
      "email": "example@email.com",
      "reference": "000051875359311XXXXXXXXXX",
      "account": {
        "name": "Chris Doe",
        "bankName": "Super BANK",
        "number": "88178XXXXXX",
        "sortCode": null
      }
    },
    "country": "NG",
    "currency": "NGN",
    "fee": {
      "vat": 2,
      "stampDuty": 0,
      "base": 2
    },
    "settlement": {
      "amount": 196
    },
    "created": "2025-05-19T18:53:00.740455409",
    "processed": "2025-05-19T18:53:00.740455409"
  }
}

Refer to the Example: virtualaccount.completed section in the main Webhooks documentation for a detailed breakdown of this payload.

✅ Notes

  • bvn is always masked in the response for compliance and security.
  • The value of reference should be unique per request to ensure idempotency.
  • The returned account.number can be used to receive payments through the listed bankName.
  • Always validate the status field before assuming the account is active or ready to use.