> ## 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.

# List Cards

> Retrieves a list of cards owned by the account making the request.

`square.listCards` retrieves a list of cards owned by the account making the request.

## Example

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

export default automation("List Square Cards", () => {
  onDashboardRun({ title: "List Square Cards" })

  square.listCards({
    cursor: "cursor",
    customerId: "customer_id",
    includeDisabled: true,
    referenceId: "reference_id",
    sortOrder: "DESC",
  })
})
```

## Inputs

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

| Field             | Type                       | Required | Default | Description                                                                                                                                                                                                                                                         |
| ----------------- | -------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cursor`          | `string \| null`           | No       | —       | A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query. See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information. |
| `customerId`      | `string \| null`           | No       | —       | Limit results to cards associated with the customer supplied. By default, all cards owned by the merchant are returned.                                                                                                                                             |
| `includeDisabled` | `boolean \| null`          | No       | —       | Includes disabled cards. By default, all enabled cards owned by the merchant are returned.                                                                                                                                                                          |
| `referenceId`     | `string \| null`           | No       | —       | Limit results to cards associated with the reference\_id supplied.                                                                                                                                                                                                  |
| `sortOrder`       | `Square.SortOrder \| null` | No       | ASC     | Sorts the returned list by when the card was created with the specified order. This field defaults to ASC.                                                                                                                                                          |

Use the official [ListCards reference](https://developer.squareup.com/reference/square/cards-api/list-cards) for provider field semantics and limits.

## Output

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