API Reference
Virtual Accounts
Create virtual account [POST]

Create a virtual account


https://sandboxapi.onbrails.com/api/v1/virtual-accounts (opens in a new tab)

Body Parameters

ParametertypeRequired
firstName
Enter first name
string
lastName
Enter last name
string
bvn
Enter user's BVN
string
dateOfBirth
Enter customer date of birth. It is only required when bank is 'providus'
stringℹ️
customerEmail
Enter Customer Email
string
reference
Enter reference for identification
string
bank
Bank should be either 'safehaven' or 'providus'
string
phoneNumber
Enter phone number
string

Request

Virtual Cards/Create Card [POST]
curl --request POST \
   --url https://sandboxapi.onbrails.com/api/v1/virtual-accounts \
   --header 'Authorization: Bearer API-KEY' \
   --header 'accept: application/json' \
   --header 'content-type: application/json' \
   --data '{
      "firstName": "Centino",
      "lastName": "Jen",
      "bvn": "00000000000",
      "dateOfBirth": "2025-03-26",
      "customerEmail": "email@email.com",
      "reference": "0ieoeuy3474",
      "bank": "providus",
      "phoneNumber": "0000000000"
    }'

Responses

🟢 200 - Result example
{
  "status": true,
  "message": "Virtual account successfully generated",
  "data": {
      "id": "a2296d18-ea09-45c3-9a58-d179b54167c9",
      "createdAt": "2025-02-17T13:56:31.790Z",
      "updatedAt": "2025-02-17T13:56:31.790Z",
      "currency": "ngn",
      "bank": "providus",
      "customerId": "2da22eba-35ea-4a14-936f-18b047498393",
      "bankName": "GLOBUS Bank",
      "reference": "0ieoeuy3474",
      "accountName": "Centino Jen",
      "accountNumber": "6563002662",
      "status": "active"
  }
}