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
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",
"customerEmail": "email@email.com",
"reference": "0ieoeuy3474",
"bank": "providus",
"phoneNumber": "0000000000"
}
'

Responses

🟢 200 - Result example
{
  "status": true,
  "message": "Virtual account successfully generated",
  "data": {
      "id": "f8d4c37d-0292-44b6-ab72-9d1fb7a4ba90",
      "createdAt": "2024-01-31T13:33:17.998Z",
      "updatedAt": "2024-01-31T13:33:17.998Z",
      "bank": "safehaven",
      "customerId": "c5da1833-87bb-4ad9-b1e7-ee41f98983",
      "bankName": "SafeHaven Microfinance Bank",
      "reference": "o1WPNZFmUDZLjDD",
      "accountName": "BRAILS_TESTING / JOE DOE",
      "accountNumber": "8010664100"
  }
}