Development
  • Guides
  • API Reference
  • API Explorer
  • SDKs
  • Sample apps
  • System status
Support
  • Developer forums
  • Developer blog
  • YouTube
  • X
More
  • Square Home
  • Square Developer
  • App Marketplace
  • Partner with Square
  • Solutions Partner Program
  • Pricing
  • Sales

© 2026 Square, Inc.

  • Developer terms of service
  • Developer Integration and Marketing Agreement
  • Privacy policy
  • Partnerships
  • Sign In
  • Sign In

    Merchant Custom Attributes

  • List merchant custom attribute definitions

  • Create merchant custom attribute definition

  • Delete merchant custom attribute definition

  • Retrieve merchant custom attribute definition

  • Update merchant custom attribute definition

  • Bulk delete merchant custom attributes

  • Bulk upsert merchant custom attributes

  • List merchant custom attributes

  • Delete merchant custom attribute

  • Retrieve merchant custom attribute

  • Upsert merchant custom attribute

  • Webhooks

  • merchant.custom_attribute_definition.owned.created

  • merchant.custom_attribute_definition.owned.deleted

  • merchant.custom_attribute_definition.owned.updated

  • merchant.custom_attribute_definition.visible.created

  • merchant.custom_attribute_definition.visible.deleted

  • merchant.custom_attribute_definition.visible.updated

  • merchant.custom_attribute.owned.deleted

  • merchant.custom_attribute.owned.updated

  • merchant.custom_attribute.visible.deleted

  • merchant.custom_attribute.visible.updated

<- Merchant Custom Attributes API

Merchant Custom Attributes API

All versions ->

Create merchant custom attribute definitionBeta

POST

 /v2/merchants/custom-attribute-definitions

Creates a merchant-related custom attribute definition for a Square seller account.

Use this endpoint to define a custom attribute that can be associated with a merchant connecting to your application. A custom attribute definition specifies the key, visibility, schema, and other properties for a custom attribute. After the definition is created, you can call UpsertMerchantCustomAttribute or BulkUpsertMerchantCustomAttributes to set the custom attribute for a merchant.

Permissions:MERCHANT_PROFILE_WRITE

Guide

Create merchant custom attribute definition

Try in API Explorer
Link to section

Request body

Example code

Link to section

custom_attribute_definition

Required

The custom attribute definition to create. Note the following:

  • With the exception of the Selection data type, the schema is specified as a simple URL to the JSON schema definition hosted on the Square CDN. For more information, including supported values and constraints, see Supported data types.
  • name is required unless visibility is set to VISIBILITY_HIDDEN.
Link to section

idempotency_key

string

A unique identifier for this request, used to ensure idempotency. For more information, see Idempotency.

Max Length
45
Link to section

Response fields

Link to section

custom_attribute_definition

The new custom attribute definition.

Link to section

errors

Any errors that occurred during the request.

Link to section

Examples

All versions ->

POST /v2/merchants/custom-attribute-definitions
curl https://connect.squareup.com/v2/merchants/custom-attribute-definitions \ -X POST \ -H 'Square-Version: 2026-11-18' \ -H 'Authorization: Bearer ACCESS_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "custom_attribute_definition": { "key": "accepted_payment_methods", "name": "Accepted Payment Methods", "description": "The accepted payment methods for this merchant.", "visibility": "VISIBILITY_READ_ONLY", "schema": { "$schema": "https://developer-production-s.squarecdn.com/meta-schemas/v1/selection.json", "type": "array", "maxItems": 3, "uniqueItems": true, "items": { "names": [ "credit_card", "check", "cash" ] } } } }'

Response JSON

{ "custom_attribute_definition": { "key": "accepted_payment_methods", "name": "Accepted Payment Methods", "description": "The accepted payment methods for this merchant.", "version": 1, "updated_at": "2023-05-05T15:57:23.211Z", "schema": { "$schema": "https://developer-production-s.squarecdn.com/meta-schemas/v1/selection.json", "maxItems": 3, "type": "array", "uniqueItems": true, "items": { "names": [ "credit_card", "check", "cash" ], "enum": [ "46efa55a-1f1d-467f-9733-468f881a4f20", "954998e1-b666-43a4-baf3-89cb87afe25a", "610fa590-70cd-4ec9-b64c-1dad6ba3c8f9" ] } }, "created_at": "2023-05-05T15:57:23.211Z", "visibility": "VISIBILITY_READ_ONLY" } }