BW
Initializing Engine...
About Terms Policy Whistleblower API
Log In Register

Static Virtual Account

Generate dedicated, reusable static bank account numbers for your customers via the Billswave API.

🔒 Endpoint

POST https://billswave.com/v1-api/static-account

⚡ How It Works

  • Automatic Caching & Deduplication: Before generating a new bank account, Billswave checks if an account already exists for the given customer email under your merchant ID. If found, it instantly returns the stored details without issuing redundant provider requests.
  • Smart Routing: Accounts are routed through our payment provider network based on your business verification level registered on your Billswave merchant account.
  • Flexible Auth: Pass your API secret key via the standard HTTP Authorization: Bearer <secret_key> header or in the JSON request body as secret_key.
  • Note: Store generated account details in your database to validate incoming transactions during webhook handling.

🔑 Headers & Authentication

Header Value Description
Content-Type application/json Mandatory header for JSON requests.
Authorization Bearer {YOUR_SECRET_KEY} Your active Billswave API Secret Key.

📥 Request Body Parameters

Parameter Type Description
email Required string Customer's email address. Used as the primary lookup index. (Alternative key: customer_email)
first_name Required string First name of the account holder. Required when creating new virtual accounts.
last_name Required string Last name of the account holder. Required when creating new virtual accounts.
phone Optional string Customer's phone number.
secret_key Optional string Your API secret key if not provided in the HTTP Authorization header.
Note: If an account already exists for the specified email under your merchant profile, first_name and last_name become optional, as the system retrieves stored details immediately.

💻 Code Snippets

cURL
HTTP Request
curl -X POST https://billswave.com/v1-api/static-account \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer bw_sec_live_xxxxxxxxxxxx" \
  -d '{
    "email": "customer@example.com",
    "first_name": "Emmanuel",
    "last_name": "Okon",
    "phone": "08141248915"
  }'
PHP
cURL Request
<?php
$payload = [
    'email'      => 'customer@example.com',
    'first_name' => 'Emmanuel',
    'last_name'  => 'Okon',
    'phone'      => '08141248915'
];

$ch = curl_init('https://billswave.com/v1-api/static-account');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode($payload),
    CURLOPT_HTTPHEADER     => [
        'Content-Type: application/json',
        'Authorization: Bearer bw_sec_live_xxxxxxxxxxxx'
    ]
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data);
?>
JavaScript
Fetch API
const createAccount = async () => {
    const response = await fetch('https://billswave.com/v1-api/static-account', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Authorization': 'Bearer bw_sec_live_xxxxxxxxxxxx'
        },
        body: JSON.stringify({
            email: 'customer@example.com',
            first_name: 'Emmanuel',
            last_name: 'Okon',
            phone: '08141248915'
        })
    });

    const result = await response.json();
    console.log(result);
};

createAccount();

📤 Sample Responses

201 Created
New Account Generated
{
  "status": true,
  "message": "Static virtual account created successfully.",
  "data": {
    "bank_name": "Billswave Bank",
    "account_number": "9920194821",
    "account_name": "BLW / Emmanuel Okon",
    "customer_email": "customer@example.com",
    "created_at": "2026-03-25 10:15:30"
  }
}
200 OK
Retrieved Existing Account
{
  "status": true,
  "message": "Virtual account retrieved successfully.",
  "data": {
    "bank_name": "Billswave Bank",
    "account_number": "9920194821",
    "account_name": "BLW / Emmanuel Okon",
    "customer_email": "customer@example.com",
    "created_at": "2026-03-25 10:15:30"
  }
}
401 Unauthorized
Invalid Key
{
  "status": false,
  "message": "Invalid or inactive API secret key."
}
400 Bad Request
Missing Parameters
{
  "status": false,
  "message": "First name and last name are required to create a new virtual account."
}