Loading...
Creates a temporary virtual account for receiving payments. The account remains active for a limited time and is configured to accept a fixed amount. When funds are received, they're automatically credited to the user's account. Required Fields: amount: The fixed amount to be collected via the virtual account (in NGN)
KEY | VALUE | DESCRIPTION |
---|---|---|
X-API-Key | X-API-Key | - |
X-API-Secret | X-API-Secret | - |
// Using fetch API
const response = await fetch("http://localhost:5000/api/v1/developer/payments/create-virtual-account", {
method: "POST",
headers: {
"X-API-Key": "X-API-Key",
"X-API-Secret": "X-API-Secret"
},
body: JSON.stringify({
"amount": null
})
});
const data = await response.json();
console.log(data);
Parameter | Type | Required | Description |
---|---|---|---|
amount | No |
{
"amount": null
}
Success response
{
"statusCode": 201
"message": "Virtual Account Created Successfully. Note that the account will be active for 15 mins"
"data" {
"sessionId": "SES123456789"
"accountNumber": "1234567890"
"accountName": "Payment to John Doe"
"validFor": 900
"externalReference": "65f8a123b42c87e1234a5432165891234"
"amount": 5000
"createdAt": "2024-03-18T14:23:45.000Z"
"updatedAt": "2024-03-18T14:23:45.000Z"
"userAccountName": "John Doe"
"id": "65f8a123b42c87e1234a9876"
"bankName": "SafeHaven MFB"
}
}