Virtual Accounts

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

  1. You create a virtual account for the customer with this endpoint and show them the details
  2. The customer transfers the amount to that account
  3. Vendy sends you a transaction_success webhook
  4. You give the customer what they paid for

Generate temporary virtual account

Request:

FieldTypeRequiredDescription
amountNumberYesThe amount the customer must transfer
msisdnStringOne of msisdn or emailCustomer phone number with country code
emailStringOne of msisdn or emailCustomer email
currencyStringNoDefaults to your business currency. Only NGN is supported
refidStringNoYour own reference for this payment
charge_customerBooleanNoAdd Vendy's fee to the amount the customer pays
metaJSON ObjectNoAny extra data to store with the transaction. It's returned in webhooks
businessIdIntegerNoIgnored 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:

FieldTypeDescription
statusBooleanStates if request was successfully executed or not
codeIntegerInternal code, success if 200
msgStringA description of the status of the request
dataObjectThe 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 codeDescription
204Input is invalid. data lists each field
217Wallet not supported. You have no wallet in this currency
306Transaction failed. The bank couldn't create the account; try again
326Business not found
338Amount 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"
  }
}
Body Params
string
Defaults to 1

Required when you call with a dashboard session token. With AccessKey/SecretKey it is ignored: the business comes from the key.

string
required
Defaults to 100

The expected amount from the customer

string
Defaults to 2348012345678

Customer phone number with country code. Send msisdn or email.

json
Defaults to {"email":"[email protected]", "your-reference":"reference"}

Object containing any extra information you want recorded with the transaction. Fields within the custom_field object will show up on merchant receipt.

string
Defaults to NGN
string

Customer email. Send msisdn or email.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json