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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Search Terminal Refunds

> Retrieves a filtered list of Interac Terminal refund requests created by the seller making the request.

`square.searchTerminalRefunds` retrieves a filtered list of Interac Terminal refund requests created by the seller making the request.

## Example

```ts automations/square-search-terminal-refunds.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Search Square Terminal Refunds", () => {
  onDashboardRun({ title: "Search Square Terminal Refunds" })

  square.searchTerminalRefunds({
    query: {
      filter: {
        status: "COMPLETED",
      },
    },
    limit: 1,
  })
})
```

## Inputs

Every input accepts a compatible signal. It requires `PAYMENTS_READ`.

| Field    | Type                         | Required | Default | Description                                                                                                                                                                                               |
| -------- | ---------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `query`  | `Square.TerminalRefundQuery` | No       | —       | Queries the Terminal refunds based on given conditions and the sort order. Calling `SearchTerminalRefunds` without an explicit query parameter returns all available refunds with the default sort order. |
| `cursor` | `string`                     | No       | —       | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query.                                                         |
| `limit`  | `number`                     | No       | —       | Limits the number of results returned for a single request.                                                                                                                                               |

Use the official [SearchTerminalRefunds reference](https://developer.squareup.com/reference/square/terminal-api/search-terminal-refunds) for provider field semantics and limits.

## Output

Returns the official `Square.SearchTerminalRefundsResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
