Skip to main content
New to virtual accounts? Read the overview first — it explains how single-use accounts fit alongside permanent and permanent_collection, and what happens when an incoming payment doesn’t match amount or arrives after duration has elapsed.
Single-use virtual accounts are ideal for checkout flows where you want to collect one specific amount from one specific payer, optionally within a bounded window of time. Unlike permanent/permanent_collection accounts, this one isn’t meant to be reused — it’s created for exactly one expected payment.
duration, when you send it, must be a string of digits"duration": "120", not "duration": 120. Sending a JSON number, or a string containing anything but digits, is rejected as a validation error.

Endpoint

Headers

string
required
Your public API key.
string
required
Your API secret. Use a stl_test_... value in sandbox, stl_live_... in production.
string
required
Your business ID.

Request body

string
required
First name to assign to the virtual account holder.
string
required
Last name to assign to the virtual account holder.
string
required
A unique reference code from your system to identify this account and the corresponding transaction.
integer
required
The exact amount the account expects to receive, in kobo. For example, 500000 equals ₦5,000. A payment for any other amount — more or less — automatically fails rather than being credited as a successful collection — see amount and duration matching.
string
How long the account stays valid, in minutes, sent as a digits-only string — e.g. "120" for 2 hours. A payment received after this window has elapsed from account creation is not accepted as a normal collection. Optional — if you omit it, the account never expires on its own; only the amount match applies.
amount is required. duration is optional — omit it for an account that stays open indefinitely (still constrained to the exact amount, just with no time limit).

Response

Returns 201 Created on success.
boolean
true on success.
string
Confirmation message, e.g. "Account generated successfully".
string
The NUBAN account number generated for this single-use account.
string
The name on the account, derived from the firstName and lastName provided.
string
The refCode you supplied, echoed back for confirmation.
string
A unique reference generated by Interstellas for this account.
string
The exact amount this account expects, in kobo — echoes the amount you supplied.
string
ISO 8601 timestamp of when this account stops accepting payments as valid — duration minutes after creation. null if you didn’t send duration, meaning the account never expires on its own.

Code examples

Example response

All amounts are in kobo. Divide by 100 to convert to naira.

What happens when a payment arrives

  • Exact match, within the window (or no duration set) — the transfer completes normally.
  • Amount doesn’t exactly match what you set on creation — the transfer automatically fails, regardless of whether the difference is an underpayment or an overpayment.
  • Received after duration has elapsed — the transfer automatically fails, even if the amount matches exactly. If you didn’t set duration, this doesn’t apply — only the amount match is checked, and the account never expires on its own.

Errors

See Errors for the full envelope and error code reference.