> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.sqril.io/llms.txt.
> For full documentation content, see https://docs.sqril.io/llms-full.txt.

# List Transactions

GET https://stg-api.sqril.io/listTransactions

Lists transactions for the authenticated exchange app with optional filtering and pagination.

**Authentication:**
- **REQUIRED**: Provide client_id and client_secret via:
  - Basic Auth: `Authorization: Basic base64(client_id:client_secret)`

- The `exchange_app_id` is automatically derived from authenticated credentials (not accepted as query parameter)

**Query Parameters:**
- `status` (optional): Filter by transaction status (PENDING, PROCESSING, SUCCESS, FAILED)
- `limit` (optional): Number of transactions to return (1-100, default: 50)
- `start_after` (optional): Transaction ID to start after for pagination (cursor-based pagination)
- `start_date` (optional): Start date for date range filter (ISO 8601 format, e.g., '2024-01-01T00:00:00Z'). Filters transactions where `created_at >= start_date`
- `end_date` (optional): End date for date range filter (ISO 8601 format, e.g., '2024-01-31T23:59:59Z'). Filters transactions where `created_at <= end_date`

**Date Range Filtering:**
- Both `start_date` and `end_date` are optional and can be used independently or together
- Dates must be in ISO 8601 format (e.g., '2024-01-01T00:00:00Z')
- If both dates are provided, `start_date` must be before or equal to `end_date`
- Date range filtering is based on the transaction's `created_at` timestamp
- Date range can be combined with status filtering

**Response:**
- `transactions`: Array of sanitized transaction objects
- `total`: Number of transactions returned
- `limit`: Limit used
- `has_more`: Whether there are more transactions available
- `next_cursor`: Transaction ID to use as start_after for next page (if has_more is true)

**Sanitization:** Each transaction object is sanitized: `provider` and `provider_tx_id` are removed, and fields whose names start with `_` (internal server-only data) are never returned.

**Note:** Transactions are ordered by `created_at` in descending order (most recent first). When filtering by status, a composite index is required in Firestore. When filtering by date range with status, a composite index is required.

Reference: https://docs.sqril.io/sqril-saa-s-api/transaction-management/list-transactions

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /listTransactions:
    get:
      operationId: list-transactions
      summary: List Transactions
      description: >-
        Lists transactions for the authenticated exchange app with optional
        filtering and pagination.


        **Authentication:**

        - **REQUIRED**: Provide client_id and client_secret via:
          - Basic Auth: `Authorization: Basic base64(client_id:client_secret)`

        - The `exchange_app_id` is automatically derived from authenticated
        credentials (not accepted as query parameter)


        **Query Parameters:**

        - `status` (optional): Filter by transaction status (PENDING,
        PROCESSING, SUCCESS, FAILED)

        - `limit` (optional): Number of transactions to return (1-100, default:
        50)

        - `start_after` (optional): Transaction ID to start after for pagination
        (cursor-based pagination)

        - `start_date` (optional): Start date for date range filter (ISO 8601
        format, e.g., '2024-01-01T00:00:00Z'). Filters transactions where
        `created_at >= start_date`

        - `end_date` (optional): End date for date range filter (ISO 8601
        format, e.g., '2024-01-31T23:59:59Z'). Filters transactions where
        `created_at <= end_date`


        **Date Range Filtering:**

        - Both `start_date` and `end_date` are optional and can be used
        independently or together

        - Dates must be in ISO 8601 format (e.g., '2024-01-01T00:00:00Z')

        - If both dates are provided, `start_date` must be before or equal to
        `end_date`

        - Date range filtering is based on the transaction's `created_at`
        timestamp

        - Date range can be combined with status filtering


        **Response:**

        - `transactions`: Array of sanitized transaction objects

        - `total`: Number of transactions returned

        - `limit`: Limit used

        - `has_more`: Whether there are more transactions available

        - `next_cursor`: Transaction ID to use as start_after for next page (if
        has_more is true)


        **Sanitization:** Each transaction object is sanitized: `provider` and
        `provider_tx_id` are removed, and fields whose names start with `_`
        (internal server-only data) are never returned.


        **Note:** Transactions are ordered by `created_at` in descending order
        (most recent first). When filtering by status, a composite index is
        required in Firestore. When filtering by date range with status, a
        composite index is required.
      tags:
        - subpackage_transactionManagement
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Transaction Management_List
                  Transactions_Response_200
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetListtransactionsRequestBadRequestError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GetListtransactionsRequestUnauthorizedError
servers:
  - url: https://stg-api.sqril.io
components:
  schemas:
    ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItemsSender:
      type: object
      properties:
        name_first:
          type: string
        name_last:
          type: string
      required:
        - name_first
        - name_last
      title: >-
        ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItemsSender
    ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItemsRecipient:
      type: object
      properties:
        name:
          type: string
        account_no:
          type: string
        bank_no:
          type: string
      required:
        - name
        - account_no
        - bank_no
      title: >-
        ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItemsRecipient
    ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItems:
      type: object
      properties:
        id:
          type: string
        exchange_app_id:
          type: string
        status:
          type: string
        amount:
          type: integer
        amount_usd:
          type: number
          format: double
        fee:
          type: number
          format: double
        percentage_fee:
          type: number
          format: double
        fixed_fee:
          type: number
          format: double
        total:
          type: number
          format: double
        currency:
          type: string
        country_code:
          type: string
        recipient_bank_no:
          type: string
        recipient_account_no:
          type: string
        recipient_account_name:
          type: string
        sender:
          $ref: >-
            #/components/schemas/ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItemsSender
        recipient:
          $ref: >-
            #/components/schemas/ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItemsRecipient
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - exchange_app_id
        - status
        - amount
        - amount_usd
        - fee
        - percentage_fee
        - fixed_fee
        - total
        - currency
        - country_code
        - recipient_bank_no
        - recipient_account_no
        - recipient_account_name
        - sender
        - recipient
        - created_at
        - updated_at
      title: >-
        ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItems
    Transaction Management_List Transactions_Response_200:
      type: object
      properties:
        transactions:
          type: array
          items:
            $ref: >-
              #/components/schemas/ListTransactionsGetResponsesContentApplicationJsonSchemaTransactionsItems
        total:
          type: integer
        limit:
          type: integer
        has_more:
          type: boolean
        next_cursor:
          description: Any type
      required:
        - transactions
        - total
        - limit
        - has_more
      title: Transaction Management_List Transactions_Response_200
    GetListtransactionsRequestBadRequestError:
      type: object
      properties:
        error:
          type: string
        limit:
          type: integer
      required:
        - error
        - limit
      title: GetListtransactionsRequestBadRequestError
    GetListtransactionsRequestUnauthorizedError:
      type: object
      properties:
        error:
          type: string
      required:
        - error
      title: GetListtransactionsRequestUnauthorizedError

```

## SDK Code Examples

```python Transaction Management_List Transactions_example
import requests

url = "https://stg-api.sqril.io/listTransactions"

response = requests.get(url)

print(response.json())
```

```javascript Transaction Management_List Transactions_example
const url = 'https://stg-api.sqril.io/listTransactions';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Transaction Management_List Transactions_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://stg-api.sqril.io/listTransactions"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Transaction Management_List Transactions_example
require 'uri'
require 'net/http'

url = URI("https://stg-api.sqril.io/listTransactions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java Transaction Management_List Transactions_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://stg-api.sqril.io/listTransactions")
  .asString();
```

```php Transaction Management_List Transactions_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://stg-api.sqril.io/listTransactions');

echo $response->getBody();
```

```csharp Transaction Management_List Transactions_example
using RestSharp;

var client = new RestClient("https://stg-api.sqril.io/listTransactions");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift Transaction Management_List Transactions_example
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://stg-api.sqril.io/listTransactions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```