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

# List Transactions

> Get paginated list of account transactions with optional date filtering

## Overview

Returns a paginated list of all transactions on your account, including deposits, withdrawals, top-ups, refunds, and transfers.

## Query Parameters

<ParamField query="page" type="integer" default={1}>
  Page number (minimum: 1)
</ParamField>

<ParamField query="pageSize" type="integer" default={20}>
  Items per page (minimum: 1, maximum: 100)
</ParamField>

<ParamField query="from" type="string">
  Start date for filtering (ISO 8601 format: `2025-10-01T00:00:00Z`)
</ParamField>

<ParamField query="to" type="string">
  End date for filtering (ISO 8601 format: `2025-10-31T23:59:59Z`)
</ParamField>

<Note>
  When filtering by date, both `from` and `to` parameters must be provided
  together.
</Note>

## Transaction Types

### Money In (Increment)

| Type             | Description                           |
| ---------------- | ------------------------------------- |
| `DEPOSIT`        | Money deposited to your account       |
| `REFUND-FLEXY`   | Refund from failed mobile top-up      |
| `REFUND-ADSL`    | Refund from failed internet top-up    |
| `REFUND-ORDER`   | Refund from cancelled gift card order |
| `RECEIVE`        | Money received from another user      |
| `POINT-EXCHANGE` | Points converted to balance           |

### Money Out (Decrement)

| Type       | Description                  |
| ---------- | ---------------------------- |
| `FLEXY`    | Mobile top-up transaction    |
| `ADSL`     | Internet top-up transaction  |
| `ORDER`    | Gift card or product order   |
| `WITHDRAW` | Money withdrawn from account |
| `SEND`     | Money sent to another user   |
| `SERVICE`  | Service payment or fee       |

## Response

<ResponseField name="success" type="boolean" required>
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object" required>
  <Expandable title="properties">
    <ResponseField name="items" type="array" required>
      Array of transaction objects

      <Expandable title="transaction object">
        <ResponseField name="_id" type="string">
          Unique transaction identifier
        </ResponseField>

        <ResponseField name="type" type="string">
          Transaction type (see types above)
        </ResponseField>

        <ResponseField name="operation" type="string">
          Operation direction: `increment` or `decrement`
        </ResponseField>

        <ResponseField name="amount" type="number">
          Transaction amount in DZD
        </ResponseField>

        <ResponseField name="oldBalance" type="number">
          Balance before transaction
        </ResponseField>

        <ResponseField name="newBalance" type="number">
          Balance after transaction
        </ResponseField>

        <ResponseField name="objid" type="string">
          Related object ID (top-up ID, order ID, etc.)
        </ResponseField>

        <ResponseField name="note" type="string">
          Optional transaction note
        </ResponseField>

        <ResponseField name="time" type="string">
          Transaction timestamp (ISO 8601)
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="pagination" type="object" required>
      <Expandable title="properties">
        <ResponseField name="page" type="integer">
          Current page number
        </ResponseField>

        <ResponseField name="pageSize" type="integer">
          Items per page
        </ResponseField>

        <ResponseField name="totalPages" type="integer">
          Total number of pages
        </ResponseField>

        <ResponseField name="totalResults" type="integer">
          Total number of transactions
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="meta" type="object" required>
  <Expandable title="properties">
    <ResponseField name="timestamp" type="string">
      Response timestamp in ISO 8601 format
    </ResponseField>
  </Expandable>
</ResponseField>

## Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.oneclickdz.com/v3/account/transactions?page=1&pageSize=20 \
    -H "X-Access-Token: YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.oneclickdz.com/v3/account/transactions?page=1&pageSize=20",
    {
      headers: { "X-Access-Token": "YOUR_API_KEY" },
    }
  );
  const { data } = await response.json();
  const transactions = data.items;
  const pagination = data.pagination;
  ```

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

  response = requests.get(
      'https://api.oneclickdz.com/v3/account/transactions',
      headers={'X-Access-Token': 'YOUR_API_KEY'},
      params={'page': 1, 'pageSize': 20}
  )
  data = response.json()['data']
  transactions = data['items']
  pagination = data['pagination']
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init();
  $url = 'https://api.oneclickdz.com/v3/account/transactions?page=1&pageSize=20';
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, ['X-Access-Token: YOUR_API_KEY']);
  $response = curl_exec($ch);
  $data = json_decode($response, true);
  $transactions = $data['data']['items'];
  ?>
  ```
</CodeGroup>

### With Date Filtering

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.oneclickdz.com/v3/account/transactions?from=2025-10-01T00:00:00Z&to=2025-10-31T23:59:59Z" \
    -H "X-Access-Token: YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const from = "2025-10-01T00:00:00Z";
  const to = "2025-10-31T23:59:59Z";
  const response = await fetch(
    `https://api.oneclickdz.com/v3/account/transactions?from=${from}&to=${to}`,
    { headers: { "X-Access-Token": "YOUR_API_KEY" } }
  );
  ```

  ```python Python theme={null}
  response = requests.get(
      'https://api.oneclickdz.com/v3/account/transactions',
      headers={'X-Access-Token': 'YOUR_API_KEY'},
      params={
          'from': '2025-10-01T00:00:00Z',
          'to': '2025-10-31T23:59:59Z'
      }
  )
  ```
</CodeGroup>

### Response Example

```json theme={null}
{
  "success": true,
  "data": {
    "items": [
      {
        "type": "FLEXY",
        "operation": "decrement",
        "oldBalance": 2316.129999998957,
        "amount": 990,
        "newBalance": 1326.129999998957,
        "objid": "68fe2cdd51bc170608683e3a",
        "note": "MIX1000_OOREDOO - 0554926570",
        "time": "2025-10-26T14:14:53.074Z",
        "_id": "68fe2cdd51bc170608683e40"
      },
      {
        "type": "REFUND-ORDER",
        "operation": "increment",
        "oldBalance": 316.1299999989569,
        "amount": 2000,
        "newBalance": 2316.129999998957,
        "objid": "68fcdd7cd712569c624e05ee",
        "note": "Refunded - 1 - 68fcdd7cd712569c624e05ee",
        "time": "2025-10-25T14:24:00.338Z",
        "_id": "68fcdd80d712569c624e069d"
      },
      {
        "type": "ORDER",
        "operation": "decrement",
        "oldBalance": 2316.129999998957,
        "amount": 2000,
        "newBalance": 316.1299999989569,
        "objid": "68fcdd7cd712569c624e05ee",
        "note": "Order - PSN Germany - 5€ - 1",
        "time": "2025-10-25T14:23:56.532Z",
        "_id": "68fcdd7cd712569c624e05f1"
      }
    ],
    "pagination": {
      "page": 1,
      "pageSize": 5,
      "totalPages": 105,
      "totalResults": 521
    }
  },
  "meta": {
    "timestamp": "2025-10-29T00:35:58.852Z"
  }
}
```

## Use Cases

<CardGroup cols={2}>
  <Card title="Transaction History" icon="clock">
    Display transaction history to users in your app
  </Card>

  <Card title="Accounting & Reports" icon="chart-line">
    Generate financial reports and statements
  </Card>

  <Card title="Balance Reconciliation" icon="scale-balanced">
    Verify balance changes and audit transactions
  </Card>

  <Card title="User Activity" icon="user">
    Track user spending patterns and behavior
  </Card>
</CardGroup>

## Best Practices

<AccordionGroup>
  <Accordion title="Pagination">
    * Start with reasonable page sizes (20-50 items)
    * Implement infinite scroll or page navigation
    * Cache results to reduce API calls
    * Use `pagination.totalPages` to determine if more data exists
  </Accordion>

  {" "}

  <Accordion title="Date Filtering">
    * Always provide both `from` and `to` parameters - Use ISO 8601 format for
      dates - Set appropriate time ranges for reports - Consider timezone
      differences when filtering
  </Accordion>

  {" "}

  <Accordion title="Performance">
    * Cache transaction data locally when possible - Use date filters to limit
      result sets - Implement proper pagination UI - Consider webhook notifications
      for real-time updates
  </Accordion>

  <Accordion title="Display">
    * Show transaction type in user-friendly language
    * Display amounts with proper currency formatting
    * Include timestamps in local timezone
    * Link transactions to related objects (top-ups, orders)
  </Accordion>
</AccordionGroup>

## Related Endpoints

<Card title="Get Balance" icon="wallet" href="/en/api-reference/account/get-balance">
  Check current account balance
</Card>
