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

> Returns a list of invoices for a given location.

`square.listInvoices` returns a list of invoices for a given location.

## Example

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

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

  square.listInvoices({
    locationId: "location_id",
    cursor: "cursor",
    limit: 1,
  })
})
```

## Inputs

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

| Field        | Type             | Required | Default | Description                                                                                                                                                                                                                                                                 |
| ------------ | ---------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `locationId` | `string`         | Yes      | —       | The ID of the location for which to list invoices.                                                                                                                                                                                                                          |
| `cursor`     | `string \| null` | No       | —       | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for your original query. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
| `limit`      | `number \| null` | No       | —       | The maximum number of invoices to return (200 is the maximum `limit`). If not provided, the server uses a default limit of 100 invoices.                                                                                                                                    |

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

## Output

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