> ## 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 Transactions

> Retrieve a list of all transactions for the application.

This endpoint returns a list of all transactions associated with your application. You can filter the results by status, type, date, or search for specific transaction identifiers.

### Query Parameters

<ParamField query="status" type="string">
  Filter by transaction status (e.g., `all`, `pending`, `completed`, `failed`).
</ParamField>

<ParamField query="transaction_type" type="string">
  Filter by transaction type (e.g., `all`, `deposit`, `withdrawal`, `transfer`).
</ParamField>

<ParamField query="start_date" type="string">
  Filter by start date in ISO format (e.g., `2025-01-01`).
</ParamField>

<ParamField query="end_date" type="string">
  Filter by end date in ISO format (e.g., `2025-01-31`).
</ParamField>

<ParamField query="search" type="string">
  Search by transaction ID or reference ID.
</ParamField>

<ParamField query="limit" type="number" default="100">
  Maximum number of transactions to return (max 1000).
</ParamField>

<ParamField query="offset" type="number" default="0">
  Number of transactions to skip for pagination.
</ParamField>

### Response

The response is an array of transaction objects.

<ResponseField name="id" type="string">
  The unique identifier for the transaction.
</ResponseField>

<ResponseField name="transaction_type" type="string">
  The type of transaction.
</ResponseField>

<ResponseField name="amount" type="number">
  The transaction amount.
</ResponseField>

<ResponseField name="currency" type="string">
  The currency code.
</ResponseField>

<ResponseField name="status" type="string">
  The final or current status.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": "trans_123...",
      "wallet_id": "wall_789...",
      "amount": 50.0,
      "currency": "USD",
      "transaction_type": "deposit",
      "status": "completed",
      "created_at": "2025-01-16T10:00:00Z"
    },
    {
      "id": "trans_456...",
      "wallet_id": "wall_012...",
      "amount": 25.0,
      "currency": "SLE",
      "transaction_type": "transfer",
      "status": "completed",
      "created_at": "2025-01-16T11:00:00Z"
    }
  ]
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://hpay-api.host-sl.com/api/v1/transactions/?limit=10&status=completed' \
    --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")

  txns = client.transactions.list(status="completed", limit=10)
  for txn in txns:
      print(txn["id"], txn["transaction_type"], txn["amount"])
  ```

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

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

  const txns = await client.transactions.list({ status: "completed", limit: 10 });
  for (const txn of txns) console.log(txn.id, txn.transaction_type, txn.amount);
  ```

  ```php PHP theme={null}
  <?php

  $curl = curl_init();

  curl_setopt_array($curl, [
    CURLOPT_URL => "https://hpay-api.host-sl.com/api/v1/transactions/?limit=10&status=completed",
    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>
