> ## 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 card transactions

> This endpoint get list of card transactions.

### 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 50`
</ParamField>

<ParamField query="card_number" type="string">
  Card number.
</ParamField>

<ParamField query="start_date" type="string">
  The starting value for specifying a date range for results to be returned.<br />
  `Format: yyyy-MM-dd HH:mm:ss`<br />
  Note: `Both the start_date and end_date must exist for this to take effect`
</ParamField>

<ParamField query="end_date" type="string">
  The ending value for specifying a date range for results to be returned.<br />
  `Format: yyyy-MM-dd HH:mm:ss`<br />
  Note: `Both the start_date and end_date must exist for this to take effect`
</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">
      <Expandable title="details" defaultOpen>
        <ResponseField name="card_id" type="string">
          Unique Identifier for card.
        </ResponseField>

        <ResponseField name="direct_id" type="string">
          Direct Account id this transaction is associated with.
        </ResponseField>

        <ResponseField name="account_id" type="string">
          The id of the account for the card.
        </ResponseField>

        <ResponseField name="card_holder_id" type="string">
          The id of the cardholder for the card.
        </ResponseField>

        <ResponseField name="transaction_id" type="string">
          Unique Identifier for transaction.
        </ResponseField>

        <ResponseField name="transaction_type" type="number">
          Type of transaction.<br />
          One of `AUTHORIZATION`, `CLEARING`, `REFUND`, `REVERSAL`, `ORIGINAL_CREDIT`
        </ResponseField>

        <ResponseField name="card_number" type="string">
          Card number.
        </ResponseField>

        <ResponseField name="card_available_balance" type="string">
          The available balance of the card this transaction is associated with.
        </ResponseField>

        <ResponseField name="authorization_code" type="string">
          Authorization code.
        </ResponseField>

        <ResponseField name="local_amount" type="string">
          Local amount.
        </ResponseField>

        <ResponseField name="local_currency" type="string">
          Local currency.
        </ResponseField>

        <ResponseField name="transaction_amount" type="string">
          Amount of transaction.
        </ResponseField>

        <ResponseField name="transaction_currency" type="string">
          Currency of transaction.
        </ResponseField>

        <ResponseField name="balance_transaction_id" type="string">
          The id of the `finance_transactions` this transaction is associated with.
        </ResponseField>

        <ResponseField name="merchant_id" type="string">
          Merchant id.
        </ResponseField>

        <ResponseField name="merchant_name" type="string">
          Merchant name.
        </ResponseField>

        <ResponseField name="merchant_country" type="string">
          Merchant country.
        </ResponseField>

        <ResponseField name="merchant_city" type="string">
          Merchant city.
        </ResponseField>

        <ResponseField name="merchant_category_code" type="string">
          Merchant category code.
        </ResponseField>

        <ResponseField name="transaction_fee" type="string">
          Transaction fee.
        </ResponseField>

        <ResponseField name="transaction_fee_currency" type="string">
          Transaction fee currency.
        </ResponseField>

        <ResponseField name="channel_code" type="string">
          Channel code within the system this transaction is associated with.
        </ResponseField>

        <ResponseField name="channel_resp_code" type="string">
          Channel response code this transaction is associated with.
        </ResponseField>

        <ResponseField name="channel_resp_body" type="string">
          Channel response body this transaction is associated with.
        </ResponseField>

        <ResponseField name="channel_transaction_id" type="string">
          Unique Identifier for channel transaction.
        </ResponseField>

        <ResponseField name="transaction_time" type="string">
          Transaction time.
        </ResponseField>

        <ResponseField name="short_account_id" type="string">
          The short id of the account for the card.
        </ResponseField>

        <ResponseField name="short_reference_id" type="string">
          Short Unique Identifier for transaction.
        </ResponseField>

        <ResponseField name="create_time" type="string">
          Create time of transaction.
        </ResponseField>

        <ResponseField name="failure_reason" type="string">
          Reason for transaction failure.
        </ResponseField>

        <ResponseField name="transaction_status" type="number">
          Transaction status.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL Example Request theme={null}
  curl 'https://api.sandbox.uqpay.org/api/v1/cards/transactions?page_num=1&page_size=10' \
  -H 'x-auth-token: Bearer 0e043e2ec6898b3220a0921466d7c203' \
  -H 'x-client-id: Up1HIsjiETPXLy7gON9PMG'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "code": 200,
      "message": "Success",
      "data": {
      "total_item": 1,
      "total_page": 1,
      "item_list": [
              {
                  "card_id": "8a01cace-188e-4f44-9329-f6de3dbd74ed",
                  "direct_id": "0",
                  "account_id": "6f790194-f9cd-4b7d-810e-092460804988",
                  "card_holder_id": "65dd6638-5c23-4d9c-9672-1e7fd0fb0c14",
                  "transaction_id": "65dd6638-5c23-4d9c-9672-1e7fd0fb0c11",
                  "transaction_type": 1000,
                  "card_number": "9333019900054676",
                  "card_available_balance": "1.00",
                  "authorization_code": "1111",
                  "local_amount": "1.00",
                  "local_currency": "USD",
                  "transaction_amount": "1.00",
                  "transaction_currency": "USD",
                  "balance_transaction_id": "",
                  "merchant_id": "123456",
                  "merchant_name": "",
                  "merchant_country": "",
                  "merchant_city": "",
                  "merchant_category_code": "",
                  "transaction_fee": "0.00",
                  "transaction_fee_currency": "USD",
                  "channel_code": "0000",
                  "channel_resp_code": "",
                  "channel_resp_body": "",
                  "channel_transaction_id": "12",
                  "transaction_time": "2023-10-12T14:57:13+08:00",
                  "short_account_id": "asdf",
                  "short_reference_id": "fed",
                  "create_time": "2023-10-12T14:57:41+08:00",
                  "failure_reason": "",
                  "transaction_status": 1111
              }
          ]
      }
  }
  ```
</ResponseExample>
