Skip to main content

Virtual Accounts

Create Virtual Account (API Key)

POST /business/virtual-account/create

Request Body

{
  "businessId": "664b...",
  "amount": 5000,
  "reference": "NexaWallet-20260313",
  "validityTime": "2400",
  "amountValidation": "A3"
}

Curl Example

curl -X POST "https://api.nexapay.ng/api/v1/business/virtual-account/create" \
  -H "Content-Type: application/json" \
  -H "x-api-key: nexa-prod-..." \
  -d '{
    "businessId":"664b...",
    "amount":5000,
    "reference":"NexaWallet-20260313",
    "validityTime":"2400",
    "amountValidation":"A3"
  }'

Response

{
  "success": true,
  "msg": "Virtual account created successfully",
  "accountNumber": "4600070017",
  "reference": "NexaWallet-20260313",
  "transactionId": "NexaWallet-20260313"
}

Error Response

{
  "success": false,
  "msg": "businessId, amount and reference are required"
}

Virtual Account History (JWT)

GET /business/virtual-account/history Includes expiresAt and status (ACTIVE / EXPIRED).
curl "https://api.nexapay.ng/api/v1/business/virtual-account/history" \
  -H "Authorization: Bearer <token>"

Response

{
  "success": true,
  "virtualAccounts": [
    {
      "reference": "NexaWallet-20260313",
      "accountNumber": "4600070017",
      "amount": 5000,
      "transactionStatus": "INITIATED",
      "createdAt": "2026-03-13T10:12:00.000Z",
      "expiresAt": "2026-03-15T02:12:00.000Z",
      "status": "ACTIVE",
      "validityTime": "2400",
      "amountValidation": "A3"
    }
  ]
}

Error Response

{
  "success": false,
  "msg": "Server error"
}

Update Virtual Account Amount (JWT)

POST /business/virtual-account/amountupdate
curl -X POST "https://api.nexapay.ng/api/v1/business/virtual-account/amountupdate" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"reference":"NexaWallet-20260313","amount":7500}'

Response

{
  "success": true,
  "msg": "Virtual account amount updated successfully",
  "reference": "NexaWallet-20260313",
  "amount": 7500
}

Invalid Example (Reference Not Found)

{
  "success": false,
  "msg": "Virtual account reference not found"
}