Create Virtual Account
Create a dedicated virtual account for a customer.
Endpoint
POST /api/v1/virtual-accounts
Request Body
ID of the customer this account belongs to.
Name to display on the account.
Optional provider override. If omitted, the gateway defaults this to auto and internal routing selects the provider.
Optional account type. Supported values depend on your tenant configuration. Common values are standard and dedicated.
Optional metadata stored with the account.
Optional BVN when required by your provider or compliance flow.
Optional ISO country code used for provider routing.
Optional currency code used for provider routing.
Optional request correlation ID.
Optional preferred bank hint for providers that support bank selection.
Response Fields
Unique identifier for the virtual account.
Tenant that owns the account.
Customer assigned to the account.
Account number returned by the underlying provider.
Provider bank code or slug.
Human-readable bank name.
Provider selected for the account.
Current account status. Typical values are active, frozen, closed, or expired.
Account type stored by the service.
Total inbound value recorded on the account, in minor units.
Number of inbound credits recorded on the account.
Provider expiry time when the allocated account is time-bound.
ISO 8601 creation timestamp.
ISO 8601 last-update timestamp.
Example Request
const account = await client.virtualAccounts.create({
customerId: 'cus_1234567890',
accountName: 'John Doe Collections',
preferredBank: 'wema-bank',
metadata: {
purpose: 'collections',
tier: 'premium'
}
});
console.log(account.accountNumber);
Example Response
{
"data": {
"id": "va_abc123xyz",
"tenant_id": "tenant_123",
"customer_id": "cus_1234567890",
"account_number": "0123456789",
"account_name": "John Doe Collections",
"bank_code": "wema-bank",
"bank_name": "Wema Bank",
"provider": "paystack_dva",
"status": "active",
"account_type": "standard",
"total_received_minor": 0,
"transaction_count": 0,
"metadata": {
"purpose": "collections",
"tier": "premium"
},
"expires_at": null,
"created_at": "2026-03-07T10:30:00Z",
"updated_at": "2026-03-07T10:30:00Z"
},
"meta": {
"timestamp": "2026-03-07T10:30:00Z",
"requestId": "req_123"
}
}
Error Responses
{
"error": {
"code": "VALIDATION_ERROR",
"message": "customer_id is required",
"details": null
},
"meta": {
"path": "/api/v1/virtual-accounts",
"method": "POST"
}
}
Notes
bank_code is an output field. The BaaS create endpoint does not require a bank code; use preferred_bank only when you need to bias provider selection.
Amounts are always returned in integer minor units. For virtual accounts, the running inbound total is total_received_minor.
Next Steps
Get Account
Retrieve account details
List Accounts
View all accounts
Handle Webhooks
Process account credits
Close Account
Close an account