> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interstellas.stellas.africa/llms.txt
> Use this file to discover all available pages before exploring further.

# List virtual accounts

> Retrieve every virtual account registered under your business.

Returns every virtual account your business has created — `permanent`, `permanent_collection`, and single-use accounts together.

## Endpoint

```
GET /clients/business/virtual-accounts
```

## Headers

<ParamField header="x-api-key" type="string" required>
  Your public API key.
</ParamField>

<ParamField header="x-api-secret" type="string" required>
  Your API secret. Use a `stl_test_...` value in sandbox, `stl_live_...` in production.
</ParamField>

<ParamField header="businessId" type="string" required>
  Your business ID.
</ParamField>

## Query parameters

<ParamField query="page" type="integer">
  Page number. Defaults to `1`.
</ParamField>

<ParamField query="limit" type="integer">
  Records per page. Defaults to `10`.
</ParamField>

<ParamField query="clientRef" type="string">
  Filter to the account created with this `reference` (or `refCode`, for single-use accounts).
</ParamField>

<ParamField query="accountNumber" type="string">
  Filter to a specific NUBAN account number.
</ParamField>

<ParamField query="dateFrom" type="string">
  ISO 8601 date — only include accounts created on or after this date.
</ParamField>

<ParamField query="dateTo" type="string">
  ISO 8601 date — only include accounts created on or before this date.
</ParamField>

See [Pagination](/essentials/pagination) for full usage — this endpoint uses Shape B.

## Response

<ResponseField name="status" type="boolean">
  `true` on success.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable outcome.
</ResponseField>

<ResponseField name="data" type="array">
  Array of virtual account objects.
</ResponseField>

<ResponseField name="data[].id" type="string">
  Unique ID for this virtual account. Use this with [Get virtual account by ID](/api-reference/virtual-accounts/get).
</ResponseField>

<ResponseField name="data[].clientRef" type="string">
  The `reference` (or `refCode`) supplied when this account was created.
</ResponseField>

<ResponseField name="data[].systemRef" type="string">
  The unique reference Interstellas generated for this account.
</ResponseField>

<ResponseField name="data[].name" type="string">
  The name on the account.
</ResponseField>

<ResponseField name="data[].accountNumber" type="string">
  The NUBAN account number.
</ResponseField>

<ResponseField name="data[].bvn" type="string">
  The BVN associated with this account, if one was set at creation.
</ResponseField>

<ResponseField name="data[].businessId" type="string">
  The business this account belongs to.
</ResponseField>

<ResponseField name="data[].dateCreated" type="string">
  ISO 8601 timestamp of when the account was created.
</ResponseField>

<ResponseField name="pagination.page" type="integer">
  The current page number.
</ResponseField>

<ResponseField name="pagination.limit" type="integer">
  The page size used for this response.
</ResponseField>

<ResponseField name="pagination.total" type="integer">
  Total number of accounts matching the current query, across all pages.
</ResponseField>

<ResponseField name="pagination.totalPages" type="integer">
  The final page number, derived from `total ÷ limit`.
</ResponseField>

## Code examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://sandbox.stellasbank.com/api/v1/clients/business/virtual-accounts?page=1&limit=10" \
    -H "x-api-key: stl_c8e286ca55b0123e0b05da047494f585" \
    -H "x-api-secret: stl_test_6332e4b1dd6c2e5814395b549aec6deb0d0664406c66f2285f95f801c76117c0" \
    -H "businessId: YOUR_BUSINESS_ID"
  ```

  ```js Node.js theme={null}
  const res = await fetch(
    "https://sandbox.stellasbank.com/api/v1/clients/business/virtual-accounts?page=1&limit=10",
    {
      headers: {
        "x-api-key": "stl_c8e286ca55b0123e0b05da047494f585",
        "x-api-secret": "stl_test_6332e4b1dd6c2e5814395b549aec6deb0d0664406c66f2285f95f801c76117c0",
        businessId: "YOUR_BUSINESS_ID",
      },
    }
  );
  const { data, pagination } = await res.json();
  ```

  ```python Python theme={null}
  import requests

  res = requests.get(
      "https://sandbox.stellasbank.com/api/v1/clients/business/virtual-accounts",
      headers={
          "x-api-key": "stl_c8e286ca55b0123e0b05da047494f585",
          "x-api-secret": "stl_test_6332e4b1dd6c2e5814395b549aec6deb0d0664406c66f2285f95f801c76117c0",
          "businessId": "YOUR_BUSINESS_ID",
      },
      params={"page": 1, "limit": 10},
  )
  print(res.json())
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "status": true,
  "message": "Successful",
  "data": [
    {
      "id": "6f9d3e2a-1b4c-4a8d-9e2f-3c1a2b4d5e6f",
      "clientRef": "ref_unique_001",
      "systemRef": "STL|jYcphJZcT73yjv",
      "name": "Ada Lovelace",
      "accountNumber": "9000081483",
      "bvn": "12345678901",
      "businessId": "biz_xyz789",
      "dateCreated": "2024-06-09T10:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 1,
    "totalPages": 1
  }
}
```

## Errors

| Status             | Cause                                            |
| ------------------ | ------------------------------------------------ |
| `400 Bad Request`  | `businessId` header missing, or not a valid UUID |
| `401 Unauthorized` | Credentials missing or invalid                   |

See [Errors](/essentials/errors) for the full envelope and error code reference.
