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

# List Transactions

> The "List Transactions" API allows to retrieve a paginated list of transactions. Customize your results by filtering transactions based on name, alt type, transaction status, payment mode, date range,

The "List Transactions" API allows to retrieve a paginated list of transactions. Customize your results by filtering transactions based on name, alt type, transaction status, payment mode, date range, type of source, contact, subscription id, entity id or paginate through the list using the provided query parameters. This endpoint provides a straightforward way to explore and retrieve transaction information.

```http theme={null}
GET https://services.leadconnectorhq.com/payments/transactions
```

## Autorización

<ParamField header="Authorization" type="string" required>
  Bearer token generado desde el portal Leadway. Ver [Autenticación](/authentication).
</ParamField>

<ParamField header="Version" type="string" required default="2021-07-28">
  Versión de la API.
</ParamField>

## Query parameters

<ParamField query="locationId" type="string" default="3SwdhCu3svxI8AKsPJt6">
  LocationId is the id of the account.
</ParamField>

<ParamField query="altId" type="string" required default="3SwdhCu3svxI8AKsPJt6">
  AltId is the unique identifier e.g: account id.
</ParamField>

<ParamField query="altType" type="string" required default="account">
  AltType is the type of identifier.
</ParamField>

<ParamField query="paymentMode" type="string" default="live">
  Mode of payment.
</ParamField>

<ParamField query="startAt" type="string" default="2024-02-01">
  Starting interval of transactions.
</ParamField>

<ParamField query="endAt" type="string" default="2024-02-13">
  Closing interval of transactions.
</ParamField>

<ParamField query="entitySourceType" type="string" default="funnel">
  Source of the transactions.
</ParamField>

<ParamField query="entitySourceSubType" type="string" default="two_step_order_form">
  Source sub-type of the transactions.
</ParamField>

<ParamField query="search" type="string" default="Awesome transaction">
  The name of the transaction for searching.
</ParamField>

<ParamField query="subscriptionId" type="string" default="sub_1KGcXDCScnf89tZoVkoEMCEL">
  Subscription id for filtering of transactions.
</ParamField>

<ParamField query="entityId" type="string" default="61dd0fe9c077f73e67f78803">
  Entity id for filtering of transactions.
</ParamField>

<ParamField query="contactId" type="string" default="XPLSw2SVagl12LMDeTmQ">
  Contact id for filtering of transactions.
</ParamField>

<ParamField query="limit" type="number" default="20">
  The maximum number of items to be included in a single page of results
</ParamField>

<ParamField query="offset" type="number" default="0">
  The starting index of the page, indicating the position from which the results should be retrieved.
</ParamField>

## Respuestas

<Accordion title="200 - Successful response">
  <ResponseField name="data" type="object[]" required>
    An array of transactions

    <Expandable title="cada item">
      <ResponseField name="_id" type="string" required default="61dd0feac077f72010f78804">
        The unique identifier for the transaction.
      </ResponseField>

      <ResponseField name="altId" type="string" required default="3SwdhCu3svxI8AKsPJt6">
        AltId is the unique identifier eg: account id.
      </ResponseField>

      <ResponseField name="altType" type="string" required default="account">
        AltType is the type of identifier.
      </ResponseField>

      <ResponseField name="contactId" type="string" default="XPLSw2SVagl12LMDeTmQ">
        Contact id corresponding to the transaction.
      </ResponseField>

      <ResponseField name="mergedFromContactId" type="string" default="XPLSw2SVagl12LMDeTmQ">
        ID of the contact that was merged from.
      </ResponseField>

      <ResponseField name="contactName" type="string" default="James Bond">
        Contact name corresponding to the transaction.
      </ResponseField>

      <ResponseField name="contactEmail" type="string" default="james.bond@leadwaycrm.com">
        Contact email corresponding to the transaction.
      </ResponseField>

      <ResponseField name="currency" type="string" default="USD">
        Currency in which transaction occurred.
      </ResponseField>

      <ResponseField name="amount" type="number" default="100">
        Transaction value.
      </ResponseField>

      <ResponseField name="status" type="object" required default="succeeded">
        The status of the transaction (e.g., succeeded).
      </ResponseField>

      <ResponseField name="liveMode" type="boolean" default="false">
        Transaction is in live / test mode.
      </ResponseField>

      <ResponseField name="entityType" type="string" default="order">
        Entity type of transaction (eg: order).
      </ResponseField>

      <ResponseField name="entityId" type="string" default="61dd0fe9c077f73e67f78803">
        Entity id for the transaction. e.g: order id
      </ResponseField>

      <ResponseField name="entitySourceType" type="string" required default="funnel">
        Entity source type of transaction (eg: funnel).
      </ResponseField>

      <ResponseField name="entitySourceSubType" type="string" default="two_step_order_form">
        Entity source sub-type of the transactions.
      </ResponseField>

      <ResponseField name="entitySourceName" type="string" default="new funnel">
        Entity source name for the transaction.
      </ResponseField>

      <ResponseField name="entitySourceId" type="string" default="BDBMEghdIUaqMPEsK349">
        Entity source id for the transaction.
      </ResponseField>

      <ResponseField name="entitySourceMeta" type="object" default="{ domain: &#x22;app.leadwaycrm.com&#x22;, pageId:  &#x22;rBVhyYhMsbxbO8ZqOcei&#x22;, pageUrl:  &#x22;/v2/preview/rBVhyYhMsbxbO8ZqOcei&#x22;, stepId:   &#x22;5a772f62-3fbc-418b-af1b-be8929dd64c2&#x22;}">
        Meta content for the entity source of transaction.
      </ResponseField>

      <ResponseField name="subscriptionId" type="string" default="sub_1KGcXDCScnf89tZoVkoEMCEL">
        Subscription id for transaction.
      </ResponseField>

      <ResponseField name="chargeId" type="string" default="in_1KGcXDCScnf89tZohCsmImwE">
        Charge id for transaction.
      </ResponseField>

      <ResponseField name="chargeSnapshot" type="object" default="{ id: &#x22;in_1KGcXDCScnf89tZohCsmImwE&#x22;, object: &#x22;invoice&#x22;, account_country: &#x22;US&#x22;,  account_name:  &#x22;GHL-Testing&#x22; }">
        Charge snapshot of transaction.
      </ResponseField>

      <ResponseField name="paymentProviderType" type="string" default="stripe">
        Payment provider for transaction.
      </ResponseField>

      <ResponseField name="paymentProviderConnectedAccount" type="string" default="612ca676b484b241fef9d962">
        Payment provider  account id for transaction.
      </ResponseField>

      <ResponseField name="ipAddress" type="string" default="107.178.194.224">
        Ip address from where transaction was initiated.
      </ResponseField>

      <ResponseField name="createdAt" type="string" required default="2023-11-20T10:23:36.515Z">
        The creation timestamp of the transaction.
      </ResponseField>

      <ResponseField name="updatedAt" type="string" required default="2023-11-20T10:23:36.515Z">
        The update timestamp of the transaction.
      </ResponseField>

      <ResponseField name="amountRefunded" type="number" default="10">
        Transaction amount refunded.
      </ResponseField>

      <ResponseField name="paymentMethod" type="object" default="{ card: { &#x22;brand&#x22;: &#x22;discover&#x22;, &#x22;last4&#x22;: &#x22;0012&#x22; } }">
        Transaction payment method details.
      </ResponseField>

      <ResponseField name="fulfilledAt" type="string" required default="2023-11-20T10:27:36.515Z">
        The charged timestamp of the transaction.
      </ResponseField>

      <ResponseField name="createdBy" type="string" default="user123">
        User ID who created the transaction.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="totalCount" type="number" required>
    total transactions count
  </ResponseField>

  ```json theme={null}
  {
    "data": [
      {
        "_id": "61dd0feac077f72010f78804",
        "altId": "3SwdhCu3svxI8AKsPJt6",
        "altType": "account",
        "contactId": "XPLSw2SVagl12LMDeTmQ",
        "mergedFromContactId": "XPLSw2SVagl12LMDeTmQ",
        "contactName": "James Bond",
        "contactEmail": "james.bond@leadwaycrm.com",
        "currency": "USD",
        "amount": "100",
        "status": "succeeded",
        "liveMode": "false",
        "entityType": "order",
        "entityId": "61dd0fe9c077f73e67f78803",
        "entitySourceType": "funnel",
        "entitySourceSubType": "two_step_order_form",
        "entitySourceName": "new funnel",
        "entitySourceId": "BDBMEghdIUaqMPEsK349",
        "entitySourceMeta": "{ domain: \"app.leadwaycrm.com\", pageId:  \"rBVhyYhMsbxbO8ZqOcei\", pageUrl:  \"/v2/preview/rBVhyYhMsbxbO8ZqOcei\", stepId:   \"5a772f62-3fbc-418b-af1b-be8929dd64c2\"}",
        "subscriptionId": "sub_1KGcXDCScnf89tZoVkoEMCEL",
        "chargeId": "in_1KGcXDCScnf89tZohCsmImwE",
        "chargeSnapshot": "{ id: \"in_1KGcXDCScnf89tZohCsmImwE\", object: \"invoice\", account_country: \"US\",  account_name:  \"GHL-Testing\" }",
        "paymentProviderType": "stripe",
        "paymentProviderConnectedAccount": "612ca676b484b241fef9d962",
        "ipAddress": "107.178.194.224",
        "createdAt": "2023-11-20T10:23:36.515Z",
        "updatedAt": "2023-11-20T10:23:36.515Z",
        "amountRefunded": "10",
        "paymentMethod": "{ card: { \"brand\": \"discover\", \"last4\": \"0012\" } }",
        "fulfilledAt": "2023-11-20T10:27:36.515Z",
        "createdBy": "user123"
      }
    ],
    "totalCount": 0
  }
  ```
</Accordion>

<Accordion title="400 - Bad Request">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="401 - Unauthorized">
  ```json theme={null}
  {}
  ```
</Accordion>

<Accordion title="422 - Unprocessable Entity">
  ```json theme={null}
  {}
  ```
</Accordion>

## Ejemplo

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET 'https://services.leadconnectorhq.com/payments/transactions' \
    -H 'Authorization: Bearer YOUR_TOKEN' \
    -H 'Version: 2021-07-28'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://services.leadconnectorhq.com/payments/transactions', {
    method: 'GET',
    headers: {
      Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
      Version: '2021-07-28',
    },
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.request(
      'GET',
      'https://services.leadconnectorhq.com/payments/transactions',
      headers={
          'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
          'Version': '2021-07-28',
      },
  )
  data = response.json()
  ```

  ```php PHP theme={null}
  <?php
  $ch = curl_init('https://services.leadconnectorhq.com/payments/transactions');
  curl_setopt_array($ch, [
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_CUSTOMREQUEST => 'GET',
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
          'Version: 2021-07-28',
      ],
  ]);
  $data = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>
