Customer bank accounts
Give a customer a permanent account number of their own. Every transfer into it is a payment from that customer to you.
Opening an account
POST /v1/customers/:id/virtual-accounts opens a permanent account for a customer. The customer must already have an email address. The bank needs the customer’s details, which must match their BVN:
| Parameter | Type | Requirement | Description |
|---|---|---|---|
| firstName | string | Required | As on the BVN. |
| lastName | string | Required | As on the BVN. |
| middleName | string | Optional | As on the BVN, if they have one. |
| phone | string | Required | The customer’s phone number, 10 to 14 digits, with or without +. |
| dateOfBirth | string | Required | YYYY-MM-DD, as on the BVN. |
| gender | enum | Required | male | female. |
| address | string | Required | The customer’s address. |
| bvn | string | Required | 11 digits. Passed to the bank to open the account, and never stored or returned by rafiqPay. |
Payments into the account
Any transfer into the account, of any amount, is credited to you as a charge, with the usual fee, and sends charge.succeeded. Each transfer is credited once, however many times the bank tells us about it.
The bank may freeze a transfer, for example a large amount into an account it holds no BVN for. A frozen transfer is not credited.
GET /v1/customers/:id/virtual-accounts lists a customer’s accounts. GET /v1/customers/:id also returns them as bankAccounts.
Testing
Test accounts have numbers that start with 99. POST /v1/customers/:id/virtual-accounts/simulate with { amount } pretends the customer sent money to their test account.