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

# Get transactions

> This endpoint retrieves a list of transactions

### Query

<ParamField path="pageNumber" type="int">
  Page number of transactions your are retrieving
</ParamField>

<ParamField path="pageSize" type="int">
  Page size of transactions your are retrieving
</ParamField>

<ParamField path="earlierDate" type="string">
  The start date for filtering transactions.
</ParamField>

<ParamField path="laterDate" type="string">
  The end date for filtering transactions.
</ParamField>

<ParamField path="transactionStatus" type="string">
  Transaction status of transactions. Valid statuses are ENQUEUED, PROCESSING, FAILED, SUCCESSFULL, REVERSED
</ParamField>

### Response

<ResponseField name="code" type="number">
  The response code indicating the status of the request. 0 for success, other values for error.
</ResponseField>

<ResponseField name="status" type="string">
  The status of the request, e.g., "success".
</ResponseField>

<ResponseField name="data" type="array">
  The list of transactions

  <Expandable title="Toggle array">
    <ResponseField name="transactionId" type="string">
      The unique id of the transaction.
    </ResponseField>

    <ResponseField name="requestId" type="string">
      The id that your system uses to identify the transaction.
    </ResponseField>

    <ResponseField name="batchId" type="string">
      The batch id of the transaction. This is useful if it was sent as part of a bulk/batch payment.
    </ResponseField>

    <ResponseField name="accountNumber" type="string">
      The account number associated with the transaction.
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of person or business that did the transaction.
    </ResponseField>

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

    <ResponseField name="amount" type="number">
      Amount of the transaction.
    </ResponseField>

    <ResponseField name="transactionType" type="string">
      The type of the transaction, e.g., "PAYOUT".
    </ResponseField>

    <ResponseField name="product" type="object">
      The product involved in the transaction.

      <Expandable title="Toggle object">
        <ResponseField name="id" type="string">
          The id of the product.
        </ResponseField>

        <ResponseField name="productItemId" type="string">
          The product item id associated with the product.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="beneficiary" type="object">
      The beneficiary of the transaction.

      <Expandable title="Toggle object">
        <ResponseField name="id" type="string">
          The id of the beneficiary.
        </ResponseField>

        <ResponseField name="name" type="string">
          The name of the beneficiary.
        </ResponseField>

        <ResponseField name="data" type="object">
          Additional data related to the beneficiary.

          <Expandable title="Toggle object">
            <ResponseField name="PhoneNumber" type="string">
              The phone number of the beneficiary.
            </ResponseField>

            <ResponseField name="memo" type="string">
              A memo or note associated with the beneficiary.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash Example Request theme={null}
  curl --location --request GET 'https://api.xente.co/api/transactions?startDate=2023-01-01&endDate=2023-01-31' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
      "code": 0,
      "message": "Transactions retrieved successfully",
      "data": {
          "collection": [
              {
                  "transactionId": "41cc8f29-f3f4-45aa-148f-08dc315567d8",
                  "requestId": "60bad96c-2358-4f73-8430-1405ddc3a93d",
                  "batchId": "123123123123",
                  "accountNumber": "6",
                  "name": null,
                  "currency": "UGX",
                  "amount": -500.00,
                  "transactionType": "PAYOUT",
                  "product": {
                      "id": "5321",
                      "name": "Fred B"
                  },
                  "beneficiary": {
                      "id": "MTNMOBILEMONEYPAYOUTUG",
                      "name": "MTN Wallet Payout",
                      "data": {
                          "CustomerReference": "0770000",
                          "CustomerPhone": "07700000",
                          "CustomerEmail": "a@b.com",
                          "Memo": "Testing"
                      }
                  }
              },
              {
                  "transactionId": "42187dd1-e681-4e0e-28c6-08dc2c9c9b8c",
                  "requestId": "18ba945c-9a41-421c-96bb-67dca6a0d201",
                  "batchId": "123123123123",
                  "accountNumber": "6",
                  "name": null,
                  "currency": "UGX",
                  "amount": -500.00,
                  "transactionType": "PAYOUT",
                  "product": {
                      "id": "MTNMOBILEMONEYPAYOUTUG",
                      "name": "Send mobile money"
                  },
                  "beneficiary": {
                      "id": "1234",
                      "name": "Jane Doe",
                      "data": {
                          "CustomerReference": "12312",
                          "CustomerPhone": +123234",
                          "CustomerEmail": "r@z.co",
                          "Memo": "Testing"
                      }
                  }
              }
          ],
          "totalCount": 53,
          "pageSize": 5,
          "currentPage": 1,
          "totalPages": 11,
          "previousPage": false,
          "nextPage": true
      }
  }

  ```
</ResponseExample>
