post
https://api.myvendy.com/transactions/virtual-accounts
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Virtual accounts are generated account details (account number and bank) that let your customers pay you by bank transfer. Virtual accounts are currently only available in naira.
This endpoint creates temporary virtual accounts. They expire after 24 hours, so use them for one-off payments: when the customer checks out, create an account for the exact amount and show it to them. When they pay, Vendy sends you a webhook. For a permanent account per customer, use Dedicated Accounts.
How does it work
- You create a virtual account for the customer with this endpoint and show them the details
- The customer transfers the amount to that account
- Vendy sends you a
transaction_successwebhook - You give the customer what they paid for
Generate temporary virtual account
Request:
| Field | Type | Required | Description |
|---|---|---|---|
| amount | Number | Yes | The amount the customer must transfer |
| msisdn | String | One of msisdn or email | Customer phone number with country code |
| String | One of msisdn or email | Customer email | |
| currency | String | No | Defaults to your business currency. Only NGN is supported |
| refid | String | No | Your own reference for this payment |
| charge_customer | Boolean | No | Add Vendy's fee to the amount the customer pays |
| meta | JSON Object | No | Any extra data to store with the transaction. It's returned in webhooks |
| businessId | Integer | No | Ignored when you use API keys. See Authentication |
Example request
curl --location 'https://api.myvendy.com/transactions/virtual-accounts' \
--header 'Content-Type: application/json' \
--header "AccessKey: $VENDY_ACCESS_KEY" \
--header "SecretKey: $VENDY_SECRET_KEY" \
--data '{
"amount": 100,
"msisdn": "2348012345678",
"meta": {
"email": "[email protected]",
"narration": "Order 1042",
"custom_field": "custom field"
}
}'Response:
| Field | Type | Description |
|---|---|---|
| status | Boolean | States if request was successfully executed or not |
| code | Integer | Internal code, success if 200 |
| msg | String | A description of the status of the request |
| data | Object | The account to show the customer: accountNo, accountName, bankName, plus trackingId, msisdn and date |
Example response
{
"status": true,
"code": 200,
"msg": "Transaction Sent",
"error": "Transaction Sent",
"data": {
"trackingId": "283158179104628033",
"msisdn": "2348012345678",
"date": "2026-10-20 11:41:47",
"accountNo": "9012345678",
"accountName": "VENDY - 2348012345678",
"bankName": "Wema Bank"
}
}Possible errors
| Error code | Description |
|---|---|
204 | Input is invalid. data lists each field |
217 | Wallet not supported. You have no wallet in this currency |
306 | Transaction failed. The bank couldn't create the account; try again |
326 | Business not found |
338 | Amount above or below your transaction limit |
Virtual account webhooks
When the customer pays, Vendy sends a transaction event. data.meta holds the account details and anything you sent in meta:
{
"event.type": "transaction_success",
"data": {
"amount": 100,
"requestamount": 100,
"delivered": 1,
"vended": 1,
"failed": 0,
"debited": 1,
"processing": 0,
"meta": {
"email": "[email protected]",
"narration": "Order 1042",
"accountNo": "9012345678",
"accountName": "VENDY - 2348012345678",
"bankName": "Wema Bank",
"provider": "wema_wallet"
},
"refid": "6281400565827151883",
"vendref": "6281400565827151883",
"debitref": "6281400565827151883",
"currency": "ngn",
"request": "Virtual account payment",
"msisdn": "2348012345678",
"reason": "Successful transaction",
"raw_reason": "Successful transaction",
"created_on": "2026-10-20 08:22:02",
"updated_on": "2026-10-20 08:22:19",
"vended_date": "2026-10-20 08:22:19",
"debited_date": "2026-10-20 08:22:19"
}
}