> ## 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 Merchant Custom Attributes

> Lists the [custom attributes](entity:CustomAttribute) associated with a merchant.

`square.listMerchantCustomAttributes` lists the [custom attributes](entity:CustomAttribute) associated with a merchant.

## Example

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

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

  square.listMerchantCustomAttributes({
    merchantId: "merchant_id",
    visibilityFilter: "ALL",
    limit: 1,
    cursor: "cursor",
    withDefinitions: true,
  })
})
```

## Inputs

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

| Field              | Type                              | Required | Default | Description                                                                                                                                                                                                                                                                                                                                          |
| ------------------ | --------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `merchantId`       | `string`                          | Yes      | —       | The ID of the target merchant.                                                                                                                                                                                                                                                                                                                       |
| `visibilityFilter` | `Square.VisibilityFilter \| null` | No       | —       | Filters the `CustomAttributeDefinition` results by their `visibility` values.                                                                                                                                                                                                                                                                        |
| `limit`            | `number \| null`                  | No       | 20      | The maximum number of results to return in a single paged response. This limit is advisory. The response might contain more or fewer results. The minimum value is 1 and the maximum value is 100. The default value is 20. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination). |
| `cursor`           | `string \| null`                  | No       | —       | The cursor returned in the paged response from the previous call to this endpoint. Provide this cursor to retrieve the next page of results for your original request. For more information, see [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination).                                                      |
| `withDefinitions`  | `boolean \| null`                 | No       | `false` | Indicates whether to return the custom attribute definition in the `definition` field of each custom attribute. Set this parameter to `true` to get the name and description of each custom attribute, information about the data type, or other definition details. The default value is `false`.                                                   |

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

## Output

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