The VirtualAccount class provides methods for interacting with Paystack’s Dedicated Virtual Account API. Virtual accounts allow you to receive payments via bank transfers with automatically generated account numbers.Documentation Index
Fetch the complete documentation index at: https://paystack-sdk.efobi.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The VirtualAccount class allows you to:- Create dedicated virtual accounts for customers
- Assign virtual accounts to existing customers
- List and fetch virtual account details
- Manage splits on virtual accounts
- Requery accounts for new transactions
- Deactivate virtual accounts
- Fetch available bank providers
Methods
create
Creates a dedicated virtual account.Customer ID or code
The preferred bank slug for the virtual account
Subaccount code to assign to the virtual account
Split code to assign to the virtual account
Customer’s first name
Customer’s last name
Customer’s phone number
The account name
The generated virtual account number
Whether the account is assigned
The account currency
Whether the account is active
Customer details including id, email, and customer_code
assign
Assigns a dedicated virtual account to a customer.Customer’s email address
Customer’s first name
Customer’s last name
Customer’s phone number
Customer’s country code
Customer’s account number for validation (Nigeria only)
Customer’s Bank Verification Number (Nigeria only)
Customer’s bank code
Subaccount code to assign
Split code to assign
list
Lists dedicated virtual accounts.Filter by active status
Filter by currency (defaults to NGN)
Filter by provider slug
Filter by bank ID
Filter by customer ID or code
Pagination metadata including total, page, perPage, and pageCount
fetch
Retrieves details of a dedicated virtual account.The ID of the dedicated virtual account
Bank details (name, id, slug)
The account name
The account number
Whether the account is assigned
The currency
Whether the account is active
Full customer details including metadata and phone
The split configuration if any
requery
Requeries a dedicated virtual account for new transactions.The virtual account number
The provider slug
ISO date to check for transactions (optional)
deactivate
Deactivates a dedicated virtual account.The ID of the dedicated virtual account to deactivate
The deactivated virtual account details with active status set to false
addSplit
Adds a split to a dedicated virtual account.Customer ID or code
Subaccount code
Split code
Preferred bank slug
Updated virtual account with split_config containing the split_code
removeSplit
Removes a split from a dedicated virtual account.The virtual account number

