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

# List Virtual Accounts

> Retrieve all reserved virtual accounts created under your business, with pagination.

Retrieve the reserved accounts created under your business. Results are paginated.

## Endpoint

```http theme={null}
POST https://api.billstack.co/v2/thirdparty/listVirtualAccounts/
```

<ParamField header="Authorization" type="string" required>
  Your secret key as a Bearer token: `Bearer Bill_Stack-SEC-KEY-…`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Body parameters

<ParamField body="page" default="1" type="integer">
  The page number to retrieve. Starts at `1`.
</ParamField>

<ParamField body="pageSize" default="20" type="integer">
  The number of results to return per page.
</ParamField>

## Request

```bash theme={null}
curl -X POST https://api.billstack.co/v2/thirdparty/listVirtualAccounts/ \
  -H "Authorization: Bearer Bill_Stack-SEC-KEY-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "page": 1,
    "pageSize": 20
  }'
```

## Response

```json theme={null}
{
  "status": true,
  "message": "Accounts retrieved",
  "data": [
    {
      "reference": "R-XXXXXXXXXXX",
      "merchant_reference": "order_12345",
      "customer": "customer@example.com",
      "account": [
        {
          "account_number": "0000000000",
          "account_name": "Alias-Ahmad Naziru",
          "bank_name": "9PSB Bank",
          "bank_id": "9PSB",
          "created_at": "2024-04-02 05:47:42"
        }
      ]
    }
  ],
  "meta": {
    "total": 135,
    "page": 1,
    "pageSize": 20,
    "totalPages": 7
  }
}
```

### Response fields

| Field             | Description                                                                                                                     |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `data`            | An array of reserved account records, each shaped like the [Get Virtual Account](/api-reference/virtual-accounts/get) response. |
| `meta.total`      | Total number of reserved accounts under your business.                                                                          |
| `meta.page`       | The current page.                                                                                                               |
| `meta.pageSize`   | Records per page.                                                                                                               |
| `meta.totalPages` | Total number of pages available.                                                                                                |

<Tip>
  Page through the full set by requesting `page=1`, then incrementing `page` until it reaches `meta.totalPages`.
</Tip>
