# Square

Manage Square: payments, refunds, orders, customers, catalog, invoices. Exposes **51 actions** covering the full API surface
the agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `square_customers_list` | List all customers - GET /customers. |
| `square_customer_get` | Get one customer by ID - GET /customers/&#123;customer_id&#125;. |
| `square_customer_create` | Create a customer - POST /customers. |
| `square_customer_update` | Update a customer - PUT /customers/&#123;customer_id&#125;. |
| `square_customer_delete` | Delete a customer - DELETE /customers/&#123;customer_id&#125;. |
| `square_customers_search` | Search customers by email, phone, name, created_at, updated_at - POST /customers/search. |
| `square_payments_list` | List payments - GET /payments. |
| `square_payment_get` | Get one payment - GET /payments/&#123;payment_id&#125;. |
| `square_payment_create` | Create a payment - POST /payments. |
| `square_payment_refund` | Refund a payment (full or partial) - POST /payments/&#123;payment_id&#125;/refunds. |
| `square_payment_complete` | Complete a delayed payment - POST /payments/&#123;payment_id&#125;/complete. |
| `square_orders_list` | List orders for a location - GET /orders. |
| `square_order_get` | Get one order - GET /orders/&#123;order_id&#125;. |
| `square_order_create` | Create an order - POST /orders. |
| `square_order_update` | Update an order - PUT /orders/&#123;order_id&#125;. |
| `square_order_request_payment` | Request a payment link for an order - POST /orders/&#123;order_id&#125;/payment_link. |
| `square_catalog_list` | List all catalog objects (items, modifiers, taxes, etc.) - GET /catalog/list. |
| `square_catalog_get` | Get one catalog object (item, modifier, tax, etc.) - GET /catalog/object/&#123;object_id&#125;. |
| `square_catalog_search` | Search catalog objects by text, category, etc. |
| `square_item_create` | Create a catalog item - POST /catalog/object. |
| `square_item_update` | Update catalog object - PUT /catalog/object. |
| `square_invoices_list` | List invoices for a location - GET /invoices. |
| `square_invoice_get` | Get one invoice - GET /invoices/&#123;invoice_id&#125;. |
| `square_invoice_create` | Create an invoice - POST /invoices. |
| `square_invoice_update` | Update an invoice - PUT /invoices/&#123;invoice_id&#125;. |
| `square_invoice_publish` | Publish/send an invoice - POST /invoices/&#123;invoice_id&#125;/publish. |
| `square_invoice_cancel` | Cancel an invoice - POST /invoices/&#123;invoice_id&#125;/cancel. |
| `square_locations_list` | List all merchant locations - GET /locations. |
| `square_location_get` | Get one location - GET /locations/&#123;location_id&#125;. |
| `square_location_create` | Create a location - POST /locations. |
| `square_location_update` | Update a location - PUT /locations/&#123;location_id&#125;. |
| `square_subscriptions_list` | List subscriptions - GET /subscriptions. |
| `square_subscription_get` | Get one subscription - GET /subscriptions/&#123;subscription_id&#125;. |
| `square_subscription_create` | Create a subscription - POST /subscriptions. |
| `square_subscription_update` | Update a subscription - PUT /subscriptions/&#123;subscription_id&#125;. |
| `square_subscription_resume` | Resume a paused subscription - POST /subscriptions/&#123;subscription_id&#125;/resume. |
| `square_subscription_pause` | Pause a subscription - POST /subscriptions/&#123;subscription_id&#125;/pause. |
| `square_subscription_cancel` | Cancel a subscription - POST /subscriptions/&#123;subscription_id&#125;/cancel. |
| `square_loyalty_programs_list` | List loyalty programs - GET /loyalty/programs. |
| `square_loyalty_account_get` | Get one loyalty account - GET /loyalty/accounts/&#123;account_id&#125;. |
| `square_loyalty_accounts_search` | Search loyalty accounts - POST /loyalty/accounts/search. |
| `square_loyalty_account_create` | Create a loyalty account - POST /loyalty/accounts. |
| `square_loyalty_points_adjust` | Adjust loyalty points - POST /loyalty/accounts/&#123;account_id&#125;/adjust. |
| `square_loyalty_rewards_list` | List loyalty rewards for an account - GET /loyalty/accounts/&#123;account_id&#125;/rewards. |
| `square_loyalty_reward_redeem` | Redeem a loyalty reward - POST /loyalty/rewards/&#123;reward_id&#125;/redeem. |
| `square_refunds_list` | List refunds - GET /refunds. |
| `square_refund_get` | Get one refund - GET /refunds/&#123;refund_id&#125;. |
| `square_refunds_for_payment` | List all refunds for a payment - GET /refunds?payment_id=&#123;payment_id&#125;. |
| `square_disputes_list` | List disputes (chargebacks, disputes) - GET /disputes. |
| `square_dispute_get` | Get one dispute - GET /disputes/&#123;dispute_id&#125;. |
| `square_dispute_add_evidence` | Add evidence to a dispute - POST /disputes/&#123;dispute_id&#125;/evidence. |

## How to get credentials

This connector uses **OAuth 2.0**. In FlyMyAI, open the tool and click
**Connect** - you'll be redirected to Square to authorize, then back to
FlyMyAI. There is no API key to paste.

> The OAuth app must be registered by FlyMyAI for this provider. If you see
> *"connection not configured"*, the provider's client credentials are still
> being set up - check back shortly.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| _(none)_ | Connect via OAuth - nothing to paste. |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the OAuth connection expired or was revoked - reconnect.
- **`429 Too Many Requests`** - you hit the provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Square API documentation](https://developer.squareup.com/reference/square)
