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

# List all transactions

> List all transactions related to the account.

### Header

<ParamField header="x-client-id" type="string" required>
  `x-client-id`.
</ParamField>

<ParamField header="x-auth-token" type="string" required>
  Bearer `YOUR_TOKEN_HERE`.
</ParamField>

### Parameters

<ParamField query="page_num" type="number" required>
  Page number, starts from 1.
</ParamField>

<ParamField query="page_size" type="number" required>
  Number of results per page.<br />
  `Maximum 100`
</ParamField>

<ParamField query="scope" type="string">
  Filter on scope.<br />
  One of `house_account`, `clients_account`
</ParamField>

<ParamField query="trans_no" type="string">
  Associated original order (Short order ID)
</ParamField>

<ParamField query="trans_type" type="string">
  Transaction type.

  | Value         | Description         |
  | ------------- | ------------------- |
  | `payin`       | Transaction payin   |
  | `payout`      | Transaction payout  |
  | `deposit`     | Transaction deposit |
  | `transfer`    | Transaction payout  |
  | `conversion`  | Transaction convert |
  | `card fee`    | Card fee            |
  | `card charge` | Card charge         |
  | `fee`         | Fee                 |
  | `adjustment`  | Adjustment          |
</ParamField>

<ParamField query="trans_status" type="string">
  Status of the transaction.

  | Value | Description |
  | ----- | ----------- |
  | `-1`  | failed      |
  | `0`   | pending     |
  | `1`   | completed   |
  | `2`   | cancelled   |
</ParamField>

<ParamField query="trans_currency" type="string">
  Currency of the transaction.<br />
  Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
</ParamField>

<ParamField query="date_type" type="string">
  Date Type is one of `create_time`  `settle_time` `complete_time` <br /> <br />
  `create_time` : The time When the transaction was created at. <br />
  `settle_time` : The time when the transaction was settled at. <br />
  `complete_time` : The time when the transaction was completed at.
</ParamField>

<ParamField query="start_time" type="number">
  Start timestamps for different `Date Types`.
</ParamField>

<ParamField query="end_time" type="number">
  End timestamps for different `Date Types`. The time span range does not exceed 30 days.
</ParamField>

### Response

<ResponseField name="code" type="number">
  Indicates whether the call was successful. 200 if successful, 400 if not.
</ResponseField>

<ResponseField name="message" type="string">
  Response Message. "Success" if successful, others not.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="details" defaultOpen>
    <ResponseField name="total_item" type="number">
      Total items.
    </ResponseField>

    <ResponseField name="total_page" type="number">
      Total pages.
    </ResponseField>

    <ResponseField name="item_list" type="array" defaultOpen>
      <Expandable title="details" defaultOpen>
        <ResponseField name="transaction_id" type="string">
          Transaction id
        </ResponseField>

        <ResponseField name="account_name" type="string">
          Account'name
        </ResponseField>

        <ResponseField name="transaction_type" type="string">
          One of Transaction type.

          | Value         | Description         |
          | ------------- | ------------------- |
          | `payin`       | Transaction payin   |
          | `payout`      | Transaction payout  |
          | `deposit`     | Transaction deposit |
          | `transfer`    | Transaction payout  |
          | `conversion`  | Transaction convert |
          | `card fee`    | Card fee            |
          | `card charge` | Card charge         |
          | `fee`         | Fee                 |
          | `adjustment`  | Adjustment          |
        </ResponseField>

        <ResponseField name="currency" type="string">
          Currency of the transaction.<br />
          Three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
        </ResponseField>

        <ResponseField name="amount" type="string">
          Total amount of transaction
        </ResponseField>

        <ResponseField name="create_time" type="string">
          The time when the transaction was created at
        </ResponseField>

        <ResponseField name="settle_time" type="string">
          The time when the transaction was settled at
        </ResponseField>

        <ResponseField name="complete_time" type="string">
          The time when the transaction was completed at
        </ResponseField>

        <ResponseField name="transaction_status" type="string">
          One of the transaction status.<br />
          `failed`,`pending`,`completed`,`cancelled`
        </ResponseField>

        <ResponseField name="reference_id" type="string">
          Associated original order (Long order ID)
        </ResponseField>

        <ResponseField name="short_reference_id" type="string">
          Associated original order (Short order ID)
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
    curl 'https://api.sandbox.uqpay.org/api/v1/transactions' \
      -H 'authority: api.sandbox.uqpay.org' \
      -H 'x-auth-token: Your Token ' \
      -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 200,
      "message": "Success",
      "data": {
          "total_item": 1,
          "total_page": 1,
          "item_list": [
              {
                  "transaction_id": "24a97271-c018-4d51-8313-1b1b2a024dcf",
                  "account_name": "Cooper's account",
                  "transaction_type": "conversion",
                  "currency": "SGD",
                  "amount": "100",
                  "create_time": "2023-09-07T10:19:15+08:00",
                  "settle_time": "2023-09-07T10:19:15+08:00",
                  "complete_time": "0001-01-01T00:00:00Z",
                  "transaction_status": "pending",
                  "reference_id": "08e294f1-ecb3-4b7e-b4e3-3fd1e98e5429",
                  "short_reference_id": "C230907-YGUJ4DHW"
              }
          ]
      }
  }
  ```
</ResponseExample>
