{
  "schemaVersion": "1.0",
  "item": {
    "slug": "squareup",
    "name": "Square",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/byungkyu/squareup",
    "canonicalUrl": "https://clawhub.ai/byungkyu/squareup",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/squareup",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=squareup",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "LICENSE.txt"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/squareup"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/squareup",
    "agentPageUrl": "https://openagent3.xyz/skills/squareup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/squareup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/squareup/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Square",
        "body": "Access the Square API with managed OAuth authentication. Process payments, manage customers, orders, catalog items, inventory, and invoices."
      },
      {
        "title": "Quick Start",
        "body": "# List locations\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/squareup/v2/locations')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Base URL",
        "body": "https://gateway.maton.ai/squareup/{native-api-path}\n\nReplace {native-api-path} with the actual Square API endpoint path. The gateway proxies requests to connect.squareup.com and automatically injects your OAuth token."
      },
      {
        "title": "Authentication",
        "body": "All requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\""
      },
      {
        "title": "Getting Your API Key",
        "body": "Sign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key"
      },
      {
        "title": "Connection Management",
        "body": "Manage your Square OAuth connections at https://ctrl.maton.ai."
      },
      {
        "title": "List Connections",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=squareup&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Create Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'squareup'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Get Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"21fd90f9-5935-43cd-b6c8-bde9d915ca80\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"squareup\",\n    \"metadata\": {}\n  }\n}\n\nOpen the returned url in a browser to complete OAuth authorization."
      },
      {
        "title": "Delete Connection",
        "body": "python <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Specifying Connection",
        "body": "If you have multiple Square connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/squareup/v2/locations')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nIf omitted, the gateway uses the default (oldest) active connection."
      },
      {
        "title": "Locations",
        "body": "List Locations\n\nGET /squareup/v2/locations\n\nGet Location\n\nGET /squareup/v2/locations/{location_id}\n\nCreate Location\n\nPOST /squareup/v2/locations\nContent-Type: application/json\n\n{\n  \"location\": {\n    \"name\": \"New Location\",\n    \"address\": {\n      \"address_line_1\": \"123 Main St\",\n      \"locality\": \"San Francisco\",\n      \"administrative_district_level_1\": \"CA\",\n      \"postal_code\": \"94102\",\n      \"country\": \"US\"\n    }\n  }\n}\n\nUpdate Location\n\nPUT /squareup/v2/locations/{location_id}\nContent-Type: application/json\n\n{\n  \"location\": {\n    \"name\": \"Updated Location Name\"\n  }\n}"
      },
      {
        "title": "Merchants",
        "body": "Get Merchant\n\nGET /squareup/v2/merchants/me\n\nList Merchants\n\nGET /squareup/v2/merchants"
      },
      {
        "title": "Payments",
        "body": "List Payments\n\nGET /squareup/v2/payments\n\nWith filters:\n\nGET /squareup/v2/payments?location_id={location_id}&begin_time=2026-01-01T00:00:00Z&end_time=2026-02-01T00:00:00Z\n\nGet Payment\n\nGET /squareup/v2/payments/{payment_id}\n\nCreate Payment\n\nPOST /squareup/v2/payments\nContent-Type: application/json\n\n{\n  \"source_id\": \"cnon:card-nonce-ok\",\n  \"idempotency_key\": \"unique-key-12345\",\n  \"amount_money\": {\n    \"amount\": 1000,\n    \"currency\": \"USD\"\n  },\n  \"location_id\": \"{location_id}\"\n}\n\nUpdate Payment\n\nPUT /squareup/v2/payments/{payment_id}\nContent-Type: application/json\n\n{\n  \"payment\": {\n    \"tip_money\": {\n      \"amount\": 200,\n      \"currency\": \"USD\"\n    }\n  },\n  \"idempotency_key\": \"unique-key-67890\"\n}\n\nComplete Payment\n\nPOST /squareup/v2/payments/{payment_id}/complete\nContent-Type: application/json\n\n{}\n\nCancel Payment\n\nPOST /squareup/v2/payments/{payment_id}/cancel\nContent-Type: application/json\n\n{}"
      },
      {
        "title": "Refunds",
        "body": "List Refunds\n\nGET /squareup/v2/refunds\n\nGet Refund\n\nGET /squareup/v2/refunds/{refund_id}\n\nCreate Refund\n\nPOST /squareup/v2/refunds\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-refund-key\",\n  \"payment_id\": \"{payment_id}\",\n  \"amount_money\": {\n    \"amount\": 500,\n    \"currency\": \"USD\"\n  },\n  \"reason\": \"Customer requested refund\"\n}"
      },
      {
        "title": "Customers",
        "body": "List Customers\n\nGET /squareup/v2/customers\n\nGet Customer\n\nGET /squareup/v2/customers/{customer_id}\n\nCreate Customer\n\nPOST /squareup/v2/customers\nContent-Type: application/json\n\n{\n  \"given_name\": \"John\",\n  \"family_name\": \"Doe\",\n  \"email_address\": \"john.doe@example.com\",\n  \"phone_number\": \"+15551234567\"\n}\n\nUpdate Customer\n\nPUT /squareup/v2/customers/{customer_id}\nContent-Type: application/json\n\n{\n  \"email_address\": \"john.updated@example.com\"\n}\n\nDelete Customer\n\nDELETE /squareup/v2/customers/{customer_id}\n\nSearch Customers\n\nPOST /squareup/v2/customers/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"filter\": {\n      \"email_address\": {\n        \"exact\": \"john.doe@example.com\"\n      }\n    }\n  }\n}"
      },
      {
        "title": "Orders",
        "body": "Create Order\n\nPOST /squareup/v2/orders\nContent-Type: application/json\n\n{\n  \"order\": {\n    \"location_id\": \"{location_id}\",\n    \"line_items\": [\n      {\n        \"name\": \"Item 1\",\n        \"quantity\": \"1\",\n        \"base_price_money\": {\n          \"amount\": 1000,\n          \"currency\": \"USD\"\n        }\n      }\n    ]\n  },\n  \"idempotency_key\": \"unique-order-key\"\n}\n\nGet Order\n\nGET /squareup/v2/orders/{order_id}\n\nUpdate Order\n\nPUT /squareup/v2/orders/{order_id}\nContent-Type: application/json\n\n{\n  \"order\": {\n    \"location_id\": \"{location_id}\",\n    \"version\": 1\n  },\n  \"fields_to_clear\": [\"line_items\"]\n}\n\nSearch Orders\n\nPOST /squareup/v2/orders/search\nContent-Type: application/json\n\n{\n  \"location_ids\": [\"{location_id}\"],\n  \"query\": {\n    \"filter\": {\n      \"state_filter\": {\n        \"states\": [\"OPEN\"]\n      }\n    }\n  }\n}\n\nBatch Retrieve Orders\n\nPOST /squareup/v2/orders/batch-retrieve\nContent-Type: application/json\n\n{\n  \"location_id\": \"{location_id}\",\n  \"order_ids\": [\"{order_id_1}\", \"{order_id_2}\"]\n}\n\nPay Order\n\nPOST /squareup/v2/orders/{order_id}/pay\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-key\",\n  \"payment_ids\": [\"{payment_id}\"]\n}"
      },
      {
        "title": "Catalog",
        "body": "List Catalog\n\nGET /squareup/v2/catalog/list\n\nWith type filter:\n\nGET /squareup/v2/catalog/list?types=ITEM,CATEGORY\n\nGet Catalog Object\n\nGET /squareup/v2/catalog/object/{object_id}\n\nUpsert Catalog Object\n\nPOST /squareup/v2/catalog/object\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-catalog-key\",\n  \"object\": {\n    \"type\": \"ITEM\",\n    \"id\": \"#new-item\",\n    \"item_data\": {\n      \"name\": \"Coffee\",\n      \"description\": \"Hot brewed coffee\",\n      \"variations\": [\n        {\n          \"type\": \"ITEM_VARIATION\",\n          \"id\": \"#small-coffee\",\n          \"item_variation_data\": {\n            \"name\": \"Small\",\n            \"pricing_type\": \"FIXED_PRICING\",\n            \"price_money\": {\n              \"amount\": 300,\n              \"currency\": \"USD\"\n            }\n          }\n        }\n      ]\n    }\n  }\n}\n\nDelete Catalog Object\n\nDELETE /squareup/v2/catalog/object/{object_id}\n\nBatch Upsert Catalog Objects\n\nPOST /squareup/v2/catalog/batch-upsert\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-batch-key\",\n  \"batches\": [\n    {\n      \"objects\": [...]\n    }\n  ]\n}\n\nSearch Catalog Objects\n\nPOST /squareup/v2/catalog/search\nContent-Type: application/json\n\n{\n  \"object_types\": [\"ITEM\"],\n  \"query\": {\n    \"text_query\": {\n      \"keywords\": [\"coffee\"]\n    }\n  }\n}\n\nGet Catalog Info\n\nGET /squareup/v2/catalog/info"
      },
      {
        "title": "Inventory",
        "body": "Retrieve Inventory Count\n\nGET /squareup/v2/inventory/{catalog_object_id}\n\nBatch Retrieve Inventory Counts\n\nPOST /squareup/v2/inventory/counts/batch-retrieve\nContent-Type: application/json\n\n{\n  \"catalog_object_ids\": [\"{object_id_1}\", \"{object_id_2}\"],\n  \"location_ids\": [\"{location_id}\"]\n}\n\nBatch Change Inventory\n\nPOST /squareup/v2/inventory/changes/batch-create\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-inventory-key\",\n  \"changes\": [\n    {\n      \"type\": \"ADJUSTMENT\",\n      \"adjustment\": {\n        \"catalog_object_id\": \"{object_id}\",\n        \"location_id\": \"{location_id}\",\n        \"quantity\": \"10\",\n        \"from_state\": \"NONE\",\n        \"to_state\": \"IN_STOCK\"\n      }\n    }\n  ]\n}\n\nRetrieve Inventory Adjustment\n\nGET /squareup/v2/inventory/adjustments/{adjustment_id}"
      },
      {
        "title": "Invoices",
        "body": "List Invoices\n\nGET /squareup/v2/invoices?location_id={location_id}\n\nGet Invoice\n\nGET /squareup/v2/invoices/{invoice_id}\n\nCreate Invoice\n\nPOST /squareup/v2/invoices\nContent-Type: application/json\n\n{\n  \"invoice\": {\n    \"location_id\": \"{location_id}\",\n    \"order_id\": \"{order_id}\",\n    \"primary_recipient\": {\n      \"customer_id\": \"{customer_id}\"\n    },\n    \"payment_requests\": [\n      {\n        \"request_type\": \"BALANCE\",\n        \"due_date\": \"2026-02-15\"\n      }\n    ],\n    \"delivery_method\": \"EMAIL\"\n  },\n  \"idempotency_key\": \"unique-invoice-key\"\n}\n\nUpdate Invoice\n\nPUT /squareup/v2/invoices/{invoice_id}\nContent-Type: application/json\n\n{\n  \"invoice\": {\n    \"version\": 1,\n    \"payment_requests\": [\n      {\n        \"uid\": \"{payment_request_uid}\",\n        \"due_date\": \"2026-02-20\"\n      }\n    ]\n  },\n  \"idempotency_key\": \"unique-update-key\"\n}\n\nPublish Invoice\n\nPOST /squareup/v2/invoices/{invoice_id}/publish\nContent-Type: application/json\n\n{\n  \"version\": 1,\n  \"idempotency_key\": \"unique-publish-key\"\n}\n\nCancel Invoice\n\nPOST /squareup/v2/invoices/{invoice_id}/cancel\nContent-Type: application/json\n\n{\n  \"version\": 1\n}\n\nDelete Invoice\n\nDELETE /squareup/v2/invoices/{invoice_id}?version=1\n\nSearch Invoices\n\nPOST /squareup/v2/invoices/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"filter\": {\n      \"location_ids\": [\"{location_id}\"],\n      \"customer_ids\": [\"{customer_id}\"]\n    }\n  }\n}"
      },
      {
        "title": "Team Members",
        "body": "Search Team Members\n\nPOST /squareup/v2/team-members/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"filter\": {\n      \"location_ids\": [\"{location_id}\"],\n      \"status\": \"ACTIVE\"\n    }\n  }\n}\n\nGet Team Member\n\nGET /squareup/v2/team-members/{team_member_id}\n\nUpdate Team Member\n\nPUT /squareup/v2/team-members/{team_member_id}\nContent-Type: application/json\n\n{\n  \"team_member\": {\n    \"given_name\": \"Updated Name\"\n  }\n}"
      },
      {
        "title": "Loyalty",
        "body": "List Loyalty Programs\n\nGET /squareup/v2/loyalty/programs\n\nGet Loyalty Program\n\nGET /squareup/v2/loyalty/programs/{program_id}\n\nSearch Loyalty Accounts\n\nPOST /squareup/v2/loyalty/accounts/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"customer_ids\": [\"{customer_id}\"]\n  }\n}\n\nCreate Loyalty Account\n\nPOST /squareup/v2/loyalty/accounts\nContent-Type: application/json\n\n{\n  \"loyalty_account\": {\n    \"program_id\": \"{program_id}\",\n    \"mapping\": {\n      \"phone_number\": \"+15551234567\"\n    }\n  },\n  \"idempotency_key\": \"unique-key\"\n}\n\nAccumulate Loyalty Points\n\nPOST /squareup/v2/loyalty/accounts/{account_id}/accumulate\nContent-Type: application/json\n\n{\n  \"accumulate_points\": {\n    \"order_id\": \"{order_id}\"\n  },\n  \"location_id\": \"{location_id}\",\n  \"idempotency_key\": \"unique-key\"\n}"
      },
      {
        "title": "Payment Links (Online Checkout)",
        "body": "List Payment Links\n\nGET /squareup/v2/online-checkout/payment-links\n\nGet Payment Link\n\nGET /squareup/v2/online-checkout/payment-links/{id}\n\nCreate Payment Link\n\nPOST /squareup/v2/online-checkout/payment-links\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-key\",\n  \"quick_pay\": {\n    \"name\": \"Payment for Service\",\n    \"price_money\": {\n      \"amount\": 1000,\n      \"currency\": \"USD\"\n    },\n    \"location_id\": \"{location_id}\"\n  }\n}\n\nUpdate Payment Link\n\nPUT /squareup/v2/online-checkout/payment-links/{id}\nContent-Type: application/json\n\n{\n  \"payment_link\": {\n    \"version\": 1,\n    \"description\": \"Updated description\"\n  }\n}\n\nDelete Payment Link\n\nDELETE /squareup/v2/online-checkout/payment-links/{id}"
      },
      {
        "title": "Cards",
        "body": "List Cards\n\nGET /squareup/v2/cards\nGET /squareup/v2/cards?customer_id={customer_id}\n\nGet Card\n\nGET /squareup/v2/cards/{card_id}\n\nCreate Card\n\nPOST /squareup/v2/cards\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-key\",\n  \"source_id\": \"cnon:card-nonce-ok\",\n  \"card\": {\n    \"customer_id\": \"{customer_id}\"\n  }\n}\n\nDisable Card\n\nPOST /squareup/v2/cards/{card_id}/disable"
      },
      {
        "title": "Payouts",
        "body": "List Payouts\n\nGET /squareup/v2/payouts\nGET /squareup/v2/payouts?location_id={location_id}\n\nGet Payout\n\nGET /squareup/v2/payouts/{payout_id}\n\nList Payout Entries\n\nGET /squareup/v2/payouts/{payout_id}/payout-entries"
      },
      {
        "title": "Bank Accounts",
        "body": "List Bank Accounts\n\nGET /squareup/v2/bank-accounts\n\nGet Bank Account\n\nGET /squareup/v2/bank-accounts/{bank_account_id}"
      },
      {
        "title": "Terminal",
        "body": "List Terminal Checkouts\n\nGET /squareup/v2/terminals/checkouts\n\nCreate Terminal Checkout\n\nPOST /squareup/v2/terminals/checkouts\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-key\",\n  \"checkout\": {\n    \"amount_money\": {\n      \"amount\": 1000,\n      \"currency\": \"USD\"\n    },\n    \"device_options\": {\n      \"device_id\": \"{device_id}\"\n    }\n  }\n}\n\nGet Terminal Checkout\n\nGET /squareup/v2/terminals/checkouts/{checkout_id}\n\nSearch Terminal Checkouts\n\nPOST /squareup/v2/terminals/checkouts/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"filter\": {\n      \"status\": \"COMPLETED\"\n    }\n  }\n}\n\nCancel Terminal Checkout\n\nPOST /squareup/v2/terminals/checkouts/{checkout_id}/cancel"
      },
      {
        "title": "Pagination",
        "body": "Square uses cursor-based pagination. List endpoints return a cursor field when more results exist:\n\nGET /squareup/v2/payments?cursor={cursor_value}\n\nResponse includes pagination info:\n\n{\n  \"payments\": [...],\n  \"cursor\": \"next_page_cursor_value\"\n}\n\nContinue fetching by passing the cursor value in subsequent requests until no cursor is returned."
      },
      {
        "title": "JavaScript",
        "body": "const response = await fetch(\n  'https://gateway.maton.ai/squareup/v2/locations',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();"
      },
      {
        "title": "Python",
        "body": "import os\nimport requests\n\nresponse = requests.get(\n    'https://gateway.maton.ai/squareup/v2/locations',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\ndata = response.json()"
      },
      {
        "title": "Notes",
        "body": "All amounts are in the smallest currency unit (e.g., cents for USD: 1000 = $10.00)\nIDs are alphanumeric strings\nTimestamps are in ISO 8601 format (e.g., 2026-02-07T01:59:28.459Z)\nMost write operations require an idempotency_key to prevent duplicate operations\nSome endpoints require specific OAuth scopes (CUSTOMERS_READ, ORDERS_READ, ITEMS_READ, INVOICES_READ, etc.)\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments"
      },
      {
        "title": "Error Handling",
        "body": "StatusMeaning400Missing Square connection or bad request401Invalid or missing Maton API key403Insufficient OAuth scopes404Resource not found429Rate limited4xx/5xxPassthrough error from Square API"
      },
      {
        "title": "Error Response Format",
        "body": "{\n  \"errors\": [\n    {\n      \"category\": \"INVALID_REQUEST_ERROR\",\n      \"code\": \"NOT_FOUND\",\n      \"detail\": \"Could not find payment with id: {payment_id}\"\n    }\n  ]\n}"
      },
      {
        "title": "Troubleshooting: API Key Issues",
        "body": "Check that the MATON_API_KEY environment variable is set:\n\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF"
      },
      {
        "title": "Troubleshooting: Invalid App Name",
        "body": "Ensure your URL path starts with squareup. For example:\n\nCorrect: https://gateway.maton.ai/squareup/v2/locations\nIncorrect: https://gateway.maton.ai/v2/locations"
      },
      {
        "title": "Troubleshooting: Insufficient Scopes",
        "body": "If you receive a 403 error with INSUFFICIENT_SCOPES, the OAuth connection doesn't have the required permissions. Create a new connection and ensure you grant all necessary permissions during OAuth authorization."
      },
      {
        "title": "Resources",
        "body": "Square API Overview\nSquare API Reference\nPayments API\nCustomers API\nOrders API\nCatalog API\nInventory API\nInvoices API\nLocations API\nTeam Members API\nLoyalty API\nOnline Checkout API\nCards API\nPayouts API\nBank Accounts API\nTerminal API\nMaton Community\nMaton Support"
      }
    ],
    "body": "Square\n\nAccess the Square API with managed OAuth authentication. Process payments, manage customers, orders, catalog items, inventory, and invoices.\n\nQuick Start\n# List locations\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/squareup/v2/locations')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nBase URL\nhttps://gateway.maton.ai/squareup/{native-api-path}\n\n\nReplace {native-api-path} with the actual Square API endpoint path. The gateway proxies requests to connect.squareup.com and automatically injects your OAuth token.\n\nAuthentication\n\nAll requests require the Maton API key in the Authorization header:\n\nAuthorization: Bearer $MATON_API_KEY\n\n\nEnvironment Variable: Set your API key as MATON_API_KEY:\n\nexport MATON_API_KEY=\"YOUR_API_KEY\"\n\nGetting Your API Key\nSign in or create an account at maton.ai\nGo to maton.ai/settings\nCopy your API key\nConnection Management\n\nManage your Square OAuth connections at https://ctrl.maton.ai.\n\nList Connections\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections?app=squareup&status=ACTIVE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nCreate Connection\npython <<'EOF'\nimport urllib.request, os, json\ndata = json.dumps({'app': 'squareup'}).encode()\nreq = urllib.request.Request('https://ctrl.maton.ai/connections', data=data, method='POST')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Content-Type', 'application/json')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nGet Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nResponse:\n\n{\n  \"connection\": {\n    \"connection_id\": \"21fd90f9-5935-43cd-b6c8-bde9d915ca80\",\n    \"status\": \"ACTIVE\",\n    \"creation_time\": \"2025-12-08T07:20:53.488460Z\",\n    \"last_updated_time\": \"2026-01-31T20:03:32.593153Z\",\n    \"url\": \"https://connect.maton.ai/?session_token=...\",\n    \"app\": \"squareup\",\n    \"metadata\": {}\n  }\n}\n\n\nOpen the returned url in a browser to complete OAuth authorization.\n\nDelete Connection\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections/{connection_id}', method='DELETE')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nSpecifying Connection\n\nIf you have multiple Square connections, specify which one to use with the Maton-Connection header:\n\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://gateway.maton.ai/squareup/v2/locations')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nreq.add_header('Maton-Connection', '21fd90f9-5935-43cd-b6c8-bde9d915ca80')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\n\nIf omitted, the gateway uses the default (oldest) active connection.\n\nAPI Reference\nLocations\nList Locations\nGET /squareup/v2/locations\n\nGet Location\nGET /squareup/v2/locations/{location_id}\n\nCreate Location\nPOST /squareup/v2/locations\nContent-Type: application/json\n\n{\n  \"location\": {\n    \"name\": \"New Location\",\n    \"address\": {\n      \"address_line_1\": \"123 Main St\",\n      \"locality\": \"San Francisco\",\n      \"administrative_district_level_1\": \"CA\",\n      \"postal_code\": \"94102\",\n      \"country\": \"US\"\n    }\n  }\n}\n\nUpdate Location\nPUT /squareup/v2/locations/{location_id}\nContent-Type: application/json\n\n{\n  \"location\": {\n    \"name\": \"Updated Location Name\"\n  }\n}\n\nMerchants\nGet Merchant\nGET /squareup/v2/merchants/me\n\nList Merchants\nGET /squareup/v2/merchants\n\nPayments\nList Payments\nGET /squareup/v2/payments\n\n\nWith filters:\n\nGET /squareup/v2/payments?location_id={location_id}&begin_time=2026-01-01T00:00:00Z&end_time=2026-02-01T00:00:00Z\n\nGet Payment\nGET /squareup/v2/payments/{payment_id}\n\nCreate Payment\nPOST /squareup/v2/payments\nContent-Type: application/json\n\n{\n  \"source_id\": \"cnon:card-nonce-ok\",\n  \"idempotency_key\": \"unique-key-12345\",\n  \"amount_money\": {\n    \"amount\": 1000,\n    \"currency\": \"USD\"\n  },\n  \"location_id\": \"{location_id}\"\n}\n\nUpdate Payment\nPUT /squareup/v2/payments/{payment_id}\nContent-Type: application/json\n\n{\n  \"payment\": {\n    \"tip_money\": {\n      \"amount\": 200,\n      \"currency\": \"USD\"\n    }\n  },\n  \"idempotency_key\": \"unique-key-67890\"\n}\n\nComplete Payment\nPOST /squareup/v2/payments/{payment_id}/complete\nContent-Type: application/json\n\n{}\n\nCancel Payment\nPOST /squareup/v2/payments/{payment_id}/cancel\nContent-Type: application/json\n\n{}\n\nRefunds\nList Refunds\nGET /squareup/v2/refunds\n\nGet Refund\nGET /squareup/v2/refunds/{refund_id}\n\nCreate Refund\nPOST /squareup/v2/refunds\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-refund-key\",\n  \"payment_id\": \"{payment_id}\",\n  \"amount_money\": {\n    \"amount\": 500,\n    \"currency\": \"USD\"\n  },\n  \"reason\": \"Customer requested refund\"\n}\n\nCustomers\nList Customers\nGET /squareup/v2/customers\n\nGet Customer\nGET /squareup/v2/customers/{customer_id}\n\nCreate Customer\nPOST /squareup/v2/customers\nContent-Type: application/json\n\n{\n  \"given_name\": \"John\",\n  \"family_name\": \"Doe\",\n  \"email_address\": \"john.doe@example.com\",\n  \"phone_number\": \"+15551234567\"\n}\n\nUpdate Customer\nPUT /squareup/v2/customers/{customer_id}\nContent-Type: application/json\n\n{\n  \"email_address\": \"john.updated@example.com\"\n}\n\nDelete Customer\nDELETE /squareup/v2/customers/{customer_id}\n\nSearch Customers\nPOST /squareup/v2/customers/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"filter\": {\n      \"email_address\": {\n        \"exact\": \"john.doe@example.com\"\n      }\n    }\n  }\n}\n\nOrders\nCreate Order\nPOST /squareup/v2/orders\nContent-Type: application/json\n\n{\n  \"order\": {\n    \"location_id\": \"{location_id}\",\n    \"line_items\": [\n      {\n        \"name\": \"Item 1\",\n        \"quantity\": \"1\",\n        \"base_price_money\": {\n          \"amount\": 1000,\n          \"currency\": \"USD\"\n        }\n      }\n    ]\n  },\n  \"idempotency_key\": \"unique-order-key\"\n}\n\nGet Order\nGET /squareup/v2/orders/{order_id}\n\nUpdate Order\nPUT /squareup/v2/orders/{order_id}\nContent-Type: application/json\n\n{\n  \"order\": {\n    \"location_id\": \"{location_id}\",\n    \"version\": 1\n  },\n  \"fields_to_clear\": [\"line_items\"]\n}\n\nSearch Orders\nPOST /squareup/v2/orders/search\nContent-Type: application/json\n\n{\n  \"location_ids\": [\"{location_id}\"],\n  \"query\": {\n    \"filter\": {\n      \"state_filter\": {\n        \"states\": [\"OPEN\"]\n      }\n    }\n  }\n}\n\nBatch Retrieve Orders\nPOST /squareup/v2/orders/batch-retrieve\nContent-Type: application/json\n\n{\n  \"location_id\": \"{location_id}\",\n  \"order_ids\": [\"{order_id_1}\", \"{order_id_2}\"]\n}\n\nPay Order\nPOST /squareup/v2/orders/{order_id}/pay\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-key\",\n  \"payment_ids\": [\"{payment_id}\"]\n}\n\nCatalog\nList Catalog\nGET /squareup/v2/catalog/list\n\n\nWith type filter:\n\nGET /squareup/v2/catalog/list?types=ITEM,CATEGORY\n\nGet Catalog Object\nGET /squareup/v2/catalog/object/{object_id}\n\nUpsert Catalog Object\nPOST /squareup/v2/catalog/object\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-catalog-key\",\n  \"object\": {\n    \"type\": \"ITEM\",\n    \"id\": \"#new-item\",\n    \"item_data\": {\n      \"name\": \"Coffee\",\n      \"description\": \"Hot brewed coffee\",\n      \"variations\": [\n        {\n          \"type\": \"ITEM_VARIATION\",\n          \"id\": \"#small-coffee\",\n          \"item_variation_data\": {\n            \"name\": \"Small\",\n            \"pricing_type\": \"FIXED_PRICING\",\n            \"price_money\": {\n              \"amount\": 300,\n              \"currency\": \"USD\"\n            }\n          }\n        }\n      ]\n    }\n  }\n}\n\nDelete Catalog Object\nDELETE /squareup/v2/catalog/object/{object_id}\n\nBatch Upsert Catalog Objects\nPOST /squareup/v2/catalog/batch-upsert\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-batch-key\",\n  \"batches\": [\n    {\n      \"objects\": [...]\n    }\n  ]\n}\n\nSearch Catalog Objects\nPOST /squareup/v2/catalog/search\nContent-Type: application/json\n\n{\n  \"object_types\": [\"ITEM\"],\n  \"query\": {\n    \"text_query\": {\n      \"keywords\": [\"coffee\"]\n    }\n  }\n}\n\nGet Catalog Info\nGET /squareup/v2/catalog/info\n\nInventory\nRetrieve Inventory Count\nGET /squareup/v2/inventory/{catalog_object_id}\n\nBatch Retrieve Inventory Counts\nPOST /squareup/v2/inventory/counts/batch-retrieve\nContent-Type: application/json\n\n{\n  \"catalog_object_ids\": [\"{object_id_1}\", \"{object_id_2}\"],\n  \"location_ids\": [\"{location_id}\"]\n}\n\nBatch Change Inventory\nPOST /squareup/v2/inventory/changes/batch-create\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-inventory-key\",\n  \"changes\": [\n    {\n      \"type\": \"ADJUSTMENT\",\n      \"adjustment\": {\n        \"catalog_object_id\": \"{object_id}\",\n        \"location_id\": \"{location_id}\",\n        \"quantity\": \"10\",\n        \"from_state\": \"NONE\",\n        \"to_state\": \"IN_STOCK\"\n      }\n    }\n  ]\n}\n\nRetrieve Inventory Adjustment\nGET /squareup/v2/inventory/adjustments/{adjustment_id}\n\nInvoices\nList Invoices\nGET /squareup/v2/invoices?location_id={location_id}\n\nGet Invoice\nGET /squareup/v2/invoices/{invoice_id}\n\nCreate Invoice\nPOST /squareup/v2/invoices\nContent-Type: application/json\n\n{\n  \"invoice\": {\n    \"location_id\": \"{location_id}\",\n    \"order_id\": \"{order_id}\",\n    \"primary_recipient\": {\n      \"customer_id\": \"{customer_id}\"\n    },\n    \"payment_requests\": [\n      {\n        \"request_type\": \"BALANCE\",\n        \"due_date\": \"2026-02-15\"\n      }\n    ],\n    \"delivery_method\": \"EMAIL\"\n  },\n  \"idempotency_key\": \"unique-invoice-key\"\n}\n\nUpdate Invoice\nPUT /squareup/v2/invoices/{invoice_id}\nContent-Type: application/json\n\n{\n  \"invoice\": {\n    \"version\": 1,\n    \"payment_requests\": [\n      {\n        \"uid\": \"{payment_request_uid}\",\n        \"due_date\": \"2026-02-20\"\n      }\n    ]\n  },\n  \"idempotency_key\": \"unique-update-key\"\n}\n\nPublish Invoice\nPOST /squareup/v2/invoices/{invoice_id}/publish\nContent-Type: application/json\n\n{\n  \"version\": 1,\n  \"idempotency_key\": \"unique-publish-key\"\n}\n\nCancel Invoice\nPOST /squareup/v2/invoices/{invoice_id}/cancel\nContent-Type: application/json\n\n{\n  \"version\": 1\n}\n\nDelete Invoice\nDELETE /squareup/v2/invoices/{invoice_id}?version=1\n\nSearch Invoices\nPOST /squareup/v2/invoices/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"filter\": {\n      \"location_ids\": [\"{location_id}\"],\n      \"customer_ids\": [\"{customer_id}\"]\n    }\n  }\n}\n\nTeam Members\nSearch Team Members\nPOST /squareup/v2/team-members/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"filter\": {\n      \"location_ids\": [\"{location_id}\"],\n      \"status\": \"ACTIVE\"\n    }\n  }\n}\n\nGet Team Member\nGET /squareup/v2/team-members/{team_member_id}\n\nUpdate Team Member\nPUT /squareup/v2/team-members/{team_member_id}\nContent-Type: application/json\n\n{\n  \"team_member\": {\n    \"given_name\": \"Updated Name\"\n  }\n}\n\nLoyalty\nList Loyalty Programs\nGET /squareup/v2/loyalty/programs\n\nGet Loyalty Program\nGET /squareup/v2/loyalty/programs/{program_id}\n\nSearch Loyalty Accounts\nPOST /squareup/v2/loyalty/accounts/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"customer_ids\": [\"{customer_id}\"]\n  }\n}\n\nCreate Loyalty Account\nPOST /squareup/v2/loyalty/accounts\nContent-Type: application/json\n\n{\n  \"loyalty_account\": {\n    \"program_id\": \"{program_id}\",\n    \"mapping\": {\n      \"phone_number\": \"+15551234567\"\n    }\n  },\n  \"idempotency_key\": \"unique-key\"\n}\n\nAccumulate Loyalty Points\nPOST /squareup/v2/loyalty/accounts/{account_id}/accumulate\nContent-Type: application/json\n\n{\n  \"accumulate_points\": {\n    \"order_id\": \"{order_id}\"\n  },\n  \"location_id\": \"{location_id}\",\n  \"idempotency_key\": \"unique-key\"\n}\n\nPayment Links (Online Checkout)\nList Payment Links\nGET /squareup/v2/online-checkout/payment-links\n\nGet Payment Link\nGET /squareup/v2/online-checkout/payment-links/{id}\n\nCreate Payment Link\nPOST /squareup/v2/online-checkout/payment-links\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-key\",\n  \"quick_pay\": {\n    \"name\": \"Payment for Service\",\n    \"price_money\": {\n      \"amount\": 1000,\n      \"currency\": \"USD\"\n    },\n    \"location_id\": \"{location_id}\"\n  }\n}\n\nUpdate Payment Link\nPUT /squareup/v2/online-checkout/payment-links/{id}\nContent-Type: application/json\n\n{\n  \"payment_link\": {\n    \"version\": 1,\n    \"description\": \"Updated description\"\n  }\n}\n\nDelete Payment Link\nDELETE /squareup/v2/online-checkout/payment-links/{id}\n\nCards\nList Cards\nGET /squareup/v2/cards\nGET /squareup/v2/cards?customer_id={customer_id}\n\nGet Card\nGET /squareup/v2/cards/{card_id}\n\nCreate Card\nPOST /squareup/v2/cards\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-key\",\n  \"source_id\": \"cnon:card-nonce-ok\",\n  \"card\": {\n    \"customer_id\": \"{customer_id}\"\n  }\n}\n\nDisable Card\nPOST /squareup/v2/cards/{card_id}/disable\n\nPayouts\nList Payouts\nGET /squareup/v2/payouts\nGET /squareup/v2/payouts?location_id={location_id}\n\nGet Payout\nGET /squareup/v2/payouts/{payout_id}\n\nList Payout Entries\nGET /squareup/v2/payouts/{payout_id}/payout-entries\n\nBank Accounts\nList Bank Accounts\nGET /squareup/v2/bank-accounts\n\nGet Bank Account\nGET /squareup/v2/bank-accounts/{bank_account_id}\n\nTerminal\nList Terminal Checkouts\nGET /squareup/v2/terminals/checkouts\n\nCreate Terminal Checkout\nPOST /squareup/v2/terminals/checkouts\nContent-Type: application/json\n\n{\n  \"idempotency_key\": \"unique-key\",\n  \"checkout\": {\n    \"amount_money\": {\n      \"amount\": 1000,\n      \"currency\": \"USD\"\n    },\n    \"device_options\": {\n      \"device_id\": \"{device_id}\"\n    }\n  }\n}\n\nGet Terminal Checkout\nGET /squareup/v2/terminals/checkouts/{checkout_id}\n\nSearch Terminal Checkouts\nPOST /squareup/v2/terminals/checkouts/search\nContent-Type: application/json\n\n{\n  \"query\": {\n    \"filter\": {\n      \"status\": \"COMPLETED\"\n    }\n  }\n}\n\nCancel Terminal Checkout\nPOST /squareup/v2/terminals/checkouts/{checkout_id}/cancel\n\nPagination\n\nSquare uses cursor-based pagination. List endpoints return a cursor field when more results exist:\n\nGET /squareup/v2/payments?cursor={cursor_value}\n\n\nResponse includes pagination info:\n\n{\n  \"payments\": [...],\n  \"cursor\": \"next_page_cursor_value\"\n}\n\n\nContinue fetching by passing the cursor value in subsequent requests until no cursor is returned.\n\nCode Examples\nJavaScript\nconst response = await fetch(\n  'https://gateway.maton.ai/squareup/v2/locations',\n  {\n    headers: {\n      'Authorization': `Bearer ${process.env.MATON_API_KEY}`\n    }\n  }\n);\nconst data = await response.json();\n\nPython\nimport os\nimport requests\n\nresponse = requests.get(\n    'https://gateway.maton.ai/squareup/v2/locations',\n    headers={'Authorization': f'Bearer {os.environ[\"MATON_API_KEY\"]}'}\n)\ndata = response.json()\n\nNotes\nAll amounts are in the smallest currency unit (e.g., cents for USD: 1000 = $10.00)\nIDs are alphanumeric strings\nTimestamps are in ISO 8601 format (e.g., 2026-02-07T01:59:28.459Z)\nMost write operations require an idempotency_key to prevent duplicate operations\nSome endpoints require specific OAuth scopes (CUSTOMERS_READ, ORDERS_READ, ITEMS_READ, INVOICES_READ, etc.)\nIMPORTANT: When using curl commands, use curl -g when URLs contain brackets to disable glob parsing\nIMPORTANT: When piping curl output to jq or other commands, environment variables like $MATON_API_KEY may not expand correctly in some shell environments\nError Handling\nStatus\tMeaning\n400\tMissing Square connection or bad request\n401\tInvalid or missing Maton API key\n403\tInsufficient OAuth scopes\n404\tResource not found\n429\tRate limited\n4xx/5xx\tPassthrough error from Square API\nError Response Format\n{\n  \"errors\": [\n    {\n      \"category\": \"INVALID_REQUEST_ERROR\",\n      \"code\": \"NOT_FOUND\",\n      \"detail\": \"Could not find payment with id: {payment_id}\"\n    }\n  ]\n}\n\nTroubleshooting: API Key Issues\nCheck that the MATON_API_KEY environment variable is set:\necho $MATON_API_KEY\n\nVerify the API key is valid by listing connections:\npython <<'EOF'\nimport urllib.request, os, json\nreq = urllib.request.Request('https://ctrl.maton.ai/connections')\nreq.add_header('Authorization', f'Bearer {os.environ[\"MATON_API_KEY\"]}')\nprint(json.dumps(json.load(urllib.request.urlopen(req)), indent=2))\nEOF\n\nTroubleshooting: Invalid App Name\nEnsure your URL path starts with squareup. For example:\nCorrect: https://gateway.maton.ai/squareup/v2/locations\nIncorrect: https://gateway.maton.ai/v2/locations\nTroubleshooting: Insufficient Scopes\n\nIf you receive a 403 error with INSUFFICIENT_SCOPES, the OAuth connection doesn't have the required permissions. Create a new connection and ensure you grant all necessary permissions during OAuth authorization.\n\nResources\nSquare API Overview\nSquare API Reference\nPayments API\nCustomers API\nOrders API\nCatalog API\nInventory API\nInvoices API\nLocations API\nTeam Members API\nLoyalty API\nOnline Checkout API\nCards API\nPayouts API\nBank Accounts API\nTerminal API\nMaton Community\nMaton Support"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/byungkyu/squareup",
    "publisherUrl": "https://clawhub.ai/byungkyu/squareup",
    "owner": "byungkyu",
    "version": "1.0.3",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/squareup",
    "downloadUrl": "https://openagent3.xyz/downloads/squareup",
    "agentUrl": "https://openagent3.xyz/skills/squareup/agent",
    "manifestUrl": "https://openagent3.xyz/skills/squareup/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/squareup/agent.md"
  }
}