Create Virtual Account
Create a new virtual bank account for receiving payments.
POST /v1/virtual-account
Headers
| Header | Required | Description |
|---|---|---|
X-Api-Key |
Yes | Your API key |
X-Idempotency-Key |
Yes | Unique key to prevent duplicate requests (UUID v4 recommended) |
Content-Type |
Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
currency |
string | Yes | Account currency: NGN or GHS |
email |
string | Yes | Customer email address |
Example Request
curl -X POST "https://api.esca.finance/v1/virtual-account" \
-H "X-Api-Key: your_api_key_here" \
-H "X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
-H "Content-Type: application/json" \
-d '{
"currency": "NGN",
"email": "customer@example.com"
}'
Example Response
{
"status": true,
"data": [
{
"id": 12345,
"accountName": "ESCA/John Doe",
"accountNumber": "8012345678",
"balance": 0,
"bankName": "Wema Bank",
"bankCode": "035",
"currency": "NGN"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
id |
integer | Unique account identifier |
accountName |
string | Name on the account |
accountNumber |
string | Virtual account number |
balance |
number | Current account balance |
bankName |
string | Name of the bank |
bankCode |
string | Bank code |
currency |
string | Account currency |