> ## Documentation Index
> Fetch the complete documentation index at: https://doc.hpay.host-sl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Wallets

> Retrieve all wallets for your application

## Endpoint

```
GET /api/v1/wallets/
```

## Headers

<ParamField header="api-key" type="string" required>
  Your application API key
</ParamField>

<ParamField header="secret-key" type="string" required>
  Your application secret key
</ParamField>

## Query Parameters

<ParamField query="is_active" type="boolean">
  Filter wallets by active status.
</ParamField>

## Response

An array of wallet objects.

<ResponseField name="items" type="array">
  <Expandable title="Wallet">
    <ResponseField name="id" type="string">
      The unique identifier of the wallet.
    </ResponseField>

    <ResponseField name="user_id" type="string">
      The ID of the user who owns the wallet.
    </ResponseField>

    <ResponseField name="balance" type="number">
      The current balance of the wallet.
    </ResponseField>

    <ResponseField name="currency" type="string">
      The currency of the wallet balance.
    </ResponseField>

    <ResponseField name="is_active" type="boolean">
      Whether the wallet is currently active.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://hpay-api.host-sl.com/api/v1/wallets/?is_active=true \
    --header 'api-key: YOUR_API_KEY' \
    --header 'secret-key: YOUR_SECRET_KEY'
  ```

  ```python Python theme={null}
  from hostpay import HostPay

  client = HostPay(api_key="YOUR_API_KEY", secret_key="YOUR_SECRET_KEY")

  wallets = client.wallets.list(is_active=True)
  for wallet in wallets:
      print(wallet["id"], wallet["balance"], wallet["currency"])
  ```

  ```typescript TypeScript theme={null}
  import { HostPay } from "@hostpay/sdk";

  const client = new HostPay({ apiKey: "YOUR_API_KEY", secretKey: "YOUR_SECRET_KEY" });

  const wallets = await client.wallets.list({ isActive: true });
  for (const wallet of wallets) console.log(wallet.id, wallet.balance, wallet.currency);
  ```

  ```php PHP theme={null}
  <?php
  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://hpay-api.host-sl.com/api/v1/wallets/?is_active=true",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
      "api-key: YOUR_API_KEY",
      "secret-key: YOUR_SECRET_KEY"
    ]
  ]);

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

  echo $response;
  ?>
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  [
    {
      "id": "wall_123",
      "user_id": "user_123",
      "balance": 150.50,
      "currency": "SLE",
      "is_active": true
    },
    {
      "id": "wall_456",
      "user_id": "user_456",
      "balance": 0.0,
      "currency": "SLE",
      "is_active": true
    }
  ]
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "detail": "Invalid application credentials"
  }
  ```
</ResponseExample>
