We use cookies to optimize your user experience. All information shared with us through cookies is secure and covered by our data privacy obligations. To learn more, view our privacy policy.
KongaPay Logo
KongaPayDevelopers
v1.0
DevelopersVirtual AccountCreate a Virtual Account

Create a Virtual Account

Use this endpoint to generate a new virtual account number. The account is immediately active upon successful creation.

Endpoint

POST/virtual/new-account

Headers

HeaderValueDescription
Content-Typeapplication/jsonRequired for all requests.
secretKey<your-secret-key>The API key issued by KongaPay for your environment.
๐Ÿ’ก
API keys are not self-served from the dashboard. After registering on the Staging or Production platform, contact the KongaPay support team to request your API keys for that environment.

Request Body

FieldTypeRequiredDescription
referencestringYesYour unique identifier for this payment. Stored as external_reference.
account_namestringYesThe display name for the virtual account.
merchant_idstringYesYour merchant identifier.
amountnumberCond.Expected payment amount in Naira. Required for nonstatic and static. Omit for static-flex.
expiers_innumberCond.Expiry duration in minutes. Required for nonstatic. Ignored for static and static-flex.
typestringYesVirtual account type: nonstatic, static, or static-flex.
callback_urlstringYesThe URL KongaPay will POST payment notifications to.
merchantstringYesMerchant category. Use "others" if not pre-classified.
โš ๏ธ
Note the intentional spelling of expiers_in โ€” this is the correct field name in the API. Do not correct it to expires_in.

Sample Request

Request
POST /virtual/new-account
Content-Type: application/json
secretKey: sk_staging_xxxxxxxxxxxxxxxxxxxx

{
  "reference":    "INV-2026-0001",
  "account_name": "Acme Stores Order 12093",
  "merchant_id":  "M-001",
  "amount":       5000,
  "expiers_in":   30,
  "type":         "nonstatic",
  "callback_url": "https://merchant.example.com/webhook",
  "merchant":     "others"
}

Success Response

HTTP 200 OK

Response
{
  "status": "success",
  "data": {
    "account_number":     "5001234567",
    "account_name":       "Acme Stores Order 12093",
    "reference":          "KP-VIR-XXXX",
    "Bank":               "KongaPay",
    "external_reference": "INV-2026-0001",
    "status":             "active"
  }
}

Error Responses

HTTP StatusCodeErrorResolution
400โ€”Bad RequestMissing or invalid fields, or secretKey not provided.
404โ€”Not FoundThe settlement account linked to secretKey does not exist.
409โ€”ConflictA virtual account with this reference already exists.