Virtual Accounts Overview

Open, update, submit, and monitor dedicated fiat virtual accounts for your B2B customers.

Dedicated virtual accounts let your customers receive local bank transfers directly into assigned account numbers. Opening an account follows an application workflow tied to a saved customer record (customerId): create a draft (or submit immediately), fill any missing fields reported by the API, submit for provisioning, and monitor account approval and incoming credits via webhooks and lookup endpoints.

flowchart TD
    A["Create or reuse Customer"] --> B["POST /virtual-accounts/applications"]
    B --> C{"Missing fields or submit=false?"}
    C -->|"Yes: draft"| D["Inspect missing fields, problems, and documents"]
    D --> E["PATCH /applications/{applicationId}"]
    E --> F["POST /applications/{applicationId}/submit"]
    C -->|"No: submit=true"| G["submitted"]
    F --> G
    G --> H{"Provisioning and review"}
    H -->|"needs_information"| E
    H -->|"approved"| I["Virtual account active"]
    H -->|"rejected"| J["Terminal: open a new application"]
    I --> K["Receive credits via virtual_account_transaction_created"]

Base URL

All endpoints in this guide are relative to:

  • Production: https://api-v2.honeycoin.app/api/b2b/virtual-accounts

Authenticate every request with Authorization: Bearer YOUR_BEARER_TOKEN. See Authentication for token generation.

Supported Products & Requirements

When you open an application for a customerId, HoneyCoin automatically seeds holderInfo from that customer's saved identity (email, phone number, name, date of birth, nationality, supported identification, or business legal name and registration number). Any holderInfo keys you pass in the create request override the seeded values.

Note: Single-character middleName initials stored on legacy customer records are omitted automatically when seeding a draft because upstream holder schemas require at least 2 characters for names.

CountryCurrencyAccount TypeRequired holderInfo FieldsIdentification / Extra Rules
NGNGNindividualfirstName, lastName, email, identificationidentification.type must be bvn with an 11-digit number
NGNGNbusinesslegalName, email, registrationNumber, phoneNumber, directorsAt least one director in directors must include an 11-digit bvn
TZTZSindividualfirstName, lastName, email, phoneNumber—
TZTZSbusinesslegalName, email, phoneNumber—
GHGHSindividualfirstName, lastName, phoneNumber, identificationidentification.type must be national-id (Ghana Card)
GHGHSbusinesslegalName, phoneNumber, registrationNumber—

Application Lifecycle & Statuses

StatusMeaningEditable?Blocks New Application for Same Customer + Product?
draftOpen draft; populate missing fields and submit when readyYesYes
submittedQueued for provisioningNoYes
awaiting_actionWaiting for a customer action (check stepRequired, e.g. otp)NoYes
pendingUnder compliance or bank reviewNoYes
needs_informationCorrections required; inspect statusReason, update via PATCH, and resubmitYesYes
approvedApproved and virtual account provisionedNoYes
rejectedTerminal rejection; open a new application if eligibleNoNo
needs_reviewSubmission outcome uncertain; contact support before retryingNoYes

Step-by-Step API Sequence

1. Create an Application

Send POST /api/b2b/virtual-accounts/applications with a customerId, 2-letter ISO country, 3-letter ISO currency, optional holderInfo overrides, optional documents, and optional submit (false by default). Include an X-Idempotency-Key header so retries after network errors replay cleanly instead of hitting 409 Conflict.

curl --request POST \
  --url https://api-v2.honeycoin.app/api/b2b/virtual-accounts/applications \
  --header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
  --header 'Content-Type: application/json' \
  --header 'X-Idempotency-Key: va-app-create-0194f1c2-7b3a' \
  --data '{
    "customerId": "cust_1234567890",
    "country": "NG",
    "currency": "NGN",
    "holderInfo": {
      "identification": {
        "type": "bvn",
        "number": "12345678901",
        "country": "NG"
      }
    },
    "submit": false
  }'

Returns 201 Created:

{
  "success": true,
  "data": {
    "applicationId": "app_01JXYZ123456",
    "status": "draft",
    "missing": {
      "fields": [],
      "problems": [],
      "documents": []
    }
  }
}

If an open or approved application already exists for the same customer and product, the API returns 409 Conflict with details containing the existing applicationId and status.

2. Inspect Missing Requirements & Update a Draft

Use GET /api/b2b/virtual-accounts/applications/{applicationId} to inspect the current status, holderInfo, and missing (fields, problems, documents).

To fill missing fields or apply corrections while an application is in draft or needs_information, send PATCH /api/b2b/virtual-accounts/applications/{applicationId}:

  • holderInfo is merged into the existing holder details (directors is replaced as a whole when provided).
  • You may pass "submit": true to update and submit in one call. Always include X-Idempotency-Key when setting "submit": true.
  • Unknown top-level fields (such as documents) are rejected with 400 VALIDATION_ERROR rather than silently ignored.
curl --request PATCH \
  --url https://api-v2.honeycoin.app/api/b2b/virtual-accounts/applications/app_01JXYZ123456 \
  --header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
  --header 'Content-Type: application/json' \
  --header 'X-Idempotency-Key: va-app-patch-0194f1c2-991a' \
  --data '{
    "holderInfo": {
      "phoneNumber": "+2348012345678"
    },
    "submit": false
  }'

3. Submit the Application

When missing.fields, missing.problems, and missing.documents are all empty, submit the application with POST /api/b2b/virtual-accounts/applications/{applicationId}/submit:

curl --request POST \
  --url https://api-v2.honeycoin.app/api/b2b/virtual-accounts/applications/app_01JXYZ123456/submit \
  --header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
  --header 'X-Idempotency-Key: va-app-submit-0194f1c2-88a1'

Returns 202 Accepted once queued for provisioning.

4. Retrieve Virtual Accounts & Transactions

Once the application reaches approved (via virtual_account_application_updated webhook or GET /applications/{applicationId}):

  • List accounts: GET /api/b2b/virtual-accounts?customerId=cust_1234567890&limit=20
  • Get one account: GET /api/b2b/virtual-accounts/{id}
  • List account transactions: GET /api/b2b/virtual-accounts/{accountId}/transactions?limit=20
  • Get one transaction: GET /api/b2b/virtual-accounts/{accountId}/transactions/{id}

List endpoints use cursor pagination via limit (1–50, default 20) and after (the last record's ID from the previous page).

Note: customerId is included on customer-owned virtual accounts and applications and omitted on merchant-owned records.

Safe Retries with X-Idempotency-Key

POST /applications, PATCH /applications/{applicationId}, and POST /applications/{applicationId}/submit all support the X-Idempotency-Key header (16–255 characters: letters, digits, -, or _).

  • Re-sending the same key with the same payload replays the original response for 1 hour instead of hitting upstream and returning 409 Conflict.
  • Concurrent retries while the first request is still processing receive 409 IDEMPOTENCY_IN_PROGRESS with Retry-After: 1.
  • Reusing a key with a different payload returns 422 IDEMPOTENCY_KEY_REUSED.

See Idempotency for full header and retry rules, Virtual Accounts Webhooks for event payloads, and Virtual Accounts Enums for exact API codes across statuses, documents, and transactions.