Skip to main content
Single-use virtual accounts are ideal for checkout flows where you want to collect a specific amount from a specific payer. The account expires automatically once used or when the duration elapses.

Endpoint

POST /clients/business/virtual-accounts/single-use

Headers

Authorization
string
required
Bearer YOUR_ACCESS_TOKEN
SECRET_KEY
string
required
Your API secret key.
businessId
string
required
Your business ID.

Request body

firstName
string
required
First name to assign to the virtual account holder.
lastName
string
required
Last name to assign to the virtual account holder.
refCode
string
required
A unique reference code from your system to identify this account and the corresponding transaction.
amount
integer
required
The exact amount the account is configured to accept, in kobo. For example, 500000 equals ₦5,000.
duration
integer
required
Time in seconds before the account expires. For example, 36000 for 10 hours.

Response

Returns 201 Created on success.
status
boolean
true on success.
message
string
Confirmation message, e.g. "Account generated successfully".
data.accountNumber
string
The NUBAN account number generated for this single-use account.
data.accountName
string
The name on the account, derived from the firstName and lastName provided.
data.clientReference
string
The refCode you supplied, echoed back for confirmation.
data.systemReference
string
A unique reference generated by Interstellas for this account.
data.reservedAmount
integer
The amount reserved on this account, in kobo.
data.expiresAt
string
ISO 8601 timestamp of when this account will expire.

Code examples

curl -X POST https://sandbox.stellasbank.com/api/v1/clients/business/virtual-accounts/single-use \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "SECRET_KEY: YOUR_SECRET_KEY" \
  -H "businessId: YOUR_BUSINESS_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "firstName": "Ada",
    "lastName": "Lovelace",
    "refCode": "order_12345",
    "amount": 500000,
    "duration": 36000
  }'

Example response

{
  "status": true,
  "message": "Account generated successfully",
  "data": {
    "accountNumber": "9012345678",
    "accountName": "Ada Lovelace",
    "clientReference": "order_12345",
    "systemReference": "sys_ref_abc789",
    "reservedAmount": 500000,
    "expiresAt": "2024-06-10T10:00:00.000Z"
  }
}
All amounts are in kobo. Divide by 100 to convert to naira.