API reference
Virtual accounts
Create and look up account numbers for your customers.
Create a virtual account
POST/virtual-accounts
Give a customer their own account number. Transfers to it are matched to them automatically.
namestringrequired
The name shown to people paying in.
customerstring
Your customer ID, returned on every payment into this account.
expires_atdatetime
Leave out for a permanent account; set it for a one-time account.
Request body
{
"name": "Ngozi Eze",
"customer": "cus_8Fq2"
}Response
{
"status": true,
"data": {
"account_number": "9930112478",
"account_name": "CSwitch / Ngozi Eze",
"bank": "CSwitch",
"customer": "cus_8Fq2",
"status": "active"
}
}Get a virtual account
GET/virtual-accounts/{account_number}
Look up a virtual account and the total paid into it.
account_numberstringrequired
The 10-digit account number.
Response
{
"status": true,
"data": {
"account_number": "9930112478",
"account_name": "CSwitch / Ngozi Eze",
"status": "active",
"total_received": 1850000
}
}