Skip to main content
POST
/
v1
/
virtual-account
Create Static Virtual Account
const url = 'https://sandboxapi.me-cash.com/v1/virtual-account';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
  body: '{"currency":"NGN","country":"NG","firstName":"Jumoke","lastName":"Dumebi","email":"example@email.com","phoneNumber":"+23481345XXXX","bvn":"12345678901","reference":"00006597506292872311029472","accountName":"Jumoke Dumebi"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "message": "virtual account created successfully",
  "status": "success",
  "data": "<any>"
}

Create Virtual Account

The Create Virtual Account API allows you to generate virtual bank accounts for receiving payments. These accounts can be used to collect payments from customers, making it easier to manage incoming funds without sharing your main business account details.

What are Virtual Accounts?

Virtual accounts are temporary or dedicated bank accounts that are linked to your main meCash account. They provide:
  • Unique Account Numbers: Each virtual account has its own account number
  • Automatic Reconciliation: Funds are automatically credited to your main account
  • Customer-Specific Accounts: Create separate accounts for different customers or transactions
  • Enhanced Security: Keep your main account details private

Use Cases

Create unique virtual accounts for each customer order to track payments easily.Benefits:
  • Automatic payment matching
  • Reduced reconciliation effort
  • Better customer experience
Generate dedicated accounts for recurring payments and subscriptions.Benefits:
  • Easy payment tracking
  • Automated billing management
  • Customer payment history
Provide sellers with individual virtual accounts for their earnings.Benefits:
  • Transparent fund allocation
  • Automated seller payouts
  • Simplified accounting
Create accounts for event ticket sales and registration fees.Benefits:
  • Event-specific payment tracking
  • Automated refund processing
  • Revenue management

Account Features

Virtual accounts are real bank accounts with actual account numbers that customers can use for transfers.Supported Banks:
  • Access Bank
  • GTBank
  • First Bank
  • Zenith Bank
  • And more…
Virtual accounts are activated immediately upon creation and ready to receive payments.Activation Time: Instant Status: Active upon creation
All payments received into virtual accounts are automatically credited to your main meCash wallet.Processing Time: Real-time Notification: Webhook notifications available

Account Management

Give your virtual accounts meaningful names for easy identification.Examples:
  • “Customer-12345-Order”
  • “Subscription-Monthly-2024”
  • “Event-Tickets-Concert”
Virtual accounts inherit the limits and permissions of your main account.Limits:
  • Daily transaction limits
  • Monthly volume limits
  • Currency restrictions
Monitor the status of your virtual accounts.Statuses:
  • active - Ready to receive payments
  • suspended - Temporarily disabled
  • closed - No longer accepting payments

Integration Examples

// Create virtual account for customer order
const virtualAccount = await createVirtualAccount({
  currency: "NGN",
  country: "NG",
  accountName: `Order-${orderId}`,
  email: customer.email,
  description: `Payment for Order #${orderId}`
});
Use Case: Generate unique accounts for each customer order
// Create virtual account for subscription
const subscriptionAccount = await createVirtualAccount({
  currency: "NGN",
  country: "NG",
  accountName: `Subscription-${customerId}`,
  email: customer.email,
  description: `Monthly subscription for ${customerId}`
});
Use Case: Dedicated accounts for recurring payments

Best Practices

  • Unique Naming: Use descriptive names that help identify the account purpose
  • Customer Communication: Share account details with customers for payments
  • Payment Tracking: Monitor incoming payments through webhooks
  • Account Cleanup: Close unused accounts to maintain organization
  • Security: Treat virtual account details with the same security as regular bank accounts
  • Reconciliation: Use the reference field to match payments with your internal records

Authorizations

x-api-key
string
header
required

Body

application/json
currency
string
required

Currency code (e.g., NGN).

country
string
required

Country code (e.g., NG).

firstName
string
required

The customer's first name.

lastName
string
required

The customer's last name.

email
string<email>
required

The customer's email address.

phoneNumber
string
required

The customer's phone number.

bvn
string
required

The customer's 11-digit Bank Verification Number.

reference
string
required

A unique reference for the request (max 30 characters).

accountName
string
required

The desired name for the virtual account.

Response

Static virtual account created successfully.

message
string
Example:

"virtual account created successfully"

status
string
Example:

"success"

data
any
I