atmon docs

REFERENCE/TOOLKITS/SQUARE.MD

Square

Point of sale and commerce. Take payments, issue refunds, and manage customers, catalog items, orders, invoices, and stock.

PropertyValue
Slugsquare
Definition version0.1.0
Base URLhttps://connect.squareup.com/v2
Auth schemesapi_key
Action tools34
By class16 read, 12 write, 6 destructive
Triggers0
Provider rate limitnot declared, so outbound calls are unpaced

Measured routing accuracy

45 golden cases replayed through the router over the whole index: measured over corpus ea4f12ad2948 (65 toolkits, 2283 tools indexed and 13 declared uncallable), 34 cases written by hand and 11 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.

MeasureCasesShare
top-121/4546.7%
top-839/4586.7%

The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. just eval-live measures the same cases through the live reranker.

Authentication

Connect an entity with ConnectionsService.InitiateConnection, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.

api_key

PropertyValue
Placementheader
NameAuthorization
Rendered asBearer {key}

Submit the key with ConnectionsService rather than putting it in a request; it is sealed at rest and never returned.

Tools

34 action tools. The catalog-wide slug is square.<tool>, which is what search_tools returns and call_tool takes.

square.create_payment

Charge a card, wallet, or cash source in Square to collect a one-time payment. Use when the user wants to take, run, charge, or collect a payment or sale. Attach a customer or order id to link the charge. Set autocomplete false to authorize now and capture later.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /payments.

Arguments:

ArgumentTypeRequiredNotes
amount_moneyobjectyesAmount to charge.
amount_money.amountintegeryesAmount in the smallest currency unit, e.g. 2000 for $20.00 usd.
amount_money.currencystringyesThree-letter ISO currency code, e.g. "usd".
autocompletebooleannoFalse to authorize the charge now and capture it later with complete_payment. Defaults to true.
customer_idstringnoSquare customer id to attach this payment to.
idempotency_keystringyesCaller-chosen unique string, at most 45 characters, that makes a retry of this exact call return the first result instead of repeating it. Square rejects the call without it.
notestringnoInternal note about this payment.
order_idstringnoExisting Square order id this payment settles.
source_idstringyesPayment source token: a card nonce from Square's Payments SDK, a saved card-on-file id, or "CASH" for a cash payment.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
paymentobject
payment.amount_moneyobject
payment.amount_money.amountinteger
payment.amount_money.currencystring
payment.created_atstring
payment.customer_idstring
payment.idstring
payment.order_idstring
payment.receipt_urlstring
payment.statusstring

Also retrieved by: "ring up this sale on the card reader", "take a payment for this order", "bill this customer's card right now", "run their card for the total", "collect money for this purchase".

square.get_payment

Get one Square payment by id: its status, amount, and linked customer or order. Use when the user asks whether a charge went through or wants details on a specific payment. For a list, use list_payments.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /payments/{{params.payment_id}}.

Arguments:

ArgumentTypeRequiredNotes
payment_idstringyesSquare payment id, e.g. "H9SqEE3thd6UzsWCNCPo1RJEEaB".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
paymentobject
payment.amount_moneyobject
payment.amount_money.amountinteger
payment.amount_money.currencystring
payment.created_atstring
payment.customer_idstring
payment.idstring
payment.order_idstring
payment.receipt_urlstring
payment.statusstring

Also retrieved by: "did that charge go through at the register", "check on this transaction's status", "what happened with this sale", "look up a specific charge by its id".

square.list_payments

List Square payments for a location or date range. Use when the user asks for recent charges, sales history, or transactions in a given window. For one known payment, use get_payment.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /payments.

Arguments:

ArgumentTypeRequiredNotes
begin_timestringnoOnly payments created at or after this RFC 3339 timestamp.
cursorstringnoPagination cursor from a previous page's response.
end_timestringnoOnly payments created before this RFC 3339 timestamp.
limitintegernoResults per page, max 100. Defaults to 100.
location_idstringnoOnly payments taken at this Square location.
sort_orderstring, one of ASC, DESCnoOldest or newest first. Defaults to DESC.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
cursorstring
paymentsarray of object
payments[].amount_moneyobject
payments[].amount_money.amountinteger
payments[].amount_money.currencystring
payments[].created_atstring
payments[].customer_idstring
payments[].idstring
payments[].statusstring

Also retrieved by: "show me today's sales", "what have we taken in this week", "pull up recent transactions at this store", "transaction history for a location".

square.complete_payment

Capture funds on a Square payment that was authorized with autocomplete false, completing the charge. Use when the user wants to capture, collect, or finalize an authorized hold, e.g. after fulfilling an order.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /payments/{{params.payment_id}}/complete.

Arguments:

ArgumentTypeRequiredNotes
payment_idstringyesSquare payment id to complete.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
paymentobject
payment.idstring
payment.statusstring

Also retrieved by: "finish collecting on that held charge", "go ahead and capture the authorized amount", "close out the hold on their card now".

square.cancel_payment

Cancel a Square payment that has not yet been completed, releasing any authorization hold. Irreversible once canceled; a new payment is needed to charge later. Use when the user wants to abandon, drop, or void a pending or authorized charge before it captures.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /payments/{{params.payment_id}}/cancel.

Arguments:

ArgumentTypeRequiredNotes
payment_idstringyesSquare payment id to cancel.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
paymentobject
payment.idstring
payment.statusstring

Also retrieved by: "never mind, don't charge them after all", "release the hold we put on their card", "drop this pending charge before it settles", "abandon this authorization".

square.create_refund

Refund a Square payment, in full or in part. Irreversible once processed; funds return to the customer's original payment method. Use when the user wants to refund, reverse, or give money back for a Square charge or sale.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /refunds.

Arguments:

ArgumentTypeRequiredNotes
amount_moneyobjectyesAmount to refund. Give less than the full charge for a partial refund.
amount_money.amountintegeryesAmount in the smallest currency unit, e.g. 2000 for $20.00 usd.
amount_money.currencystringyesThree-letter ISO currency code, e.g. "usd".
idempotency_keystringyesCaller-chosen unique string, at most 45 characters, that makes a retry of this exact call return the first result instead of repeating it. Square rejects the call without it.
payment_idstringyesSquare payment id to refund.
reasonstringnoWhy the refund is being issued, shown to the merchant.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
refundobject
refund.amount_moneyobject
refund.amount_money.amountinteger
refund.amount_money.currencystring
refund.idstring
refund.payment_idstring
refund.reasonstring
refund.statusstring

Also retrieved by: "give the customer their money back", "reverse this sale, they returned the item", "send a refund for this transaction", "credit them back for what they bought", "undo this charge".

square.get_refund

Get one Square refund by id: its status, amount, and the payment it applies to. Use when the user asks whether a specific refund went through.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /refunds/{{params.refund_id}}.

Arguments:

ArgumentTypeRequiredNotes
refund_idstringyesSquare refund id, e.g. "0Osr8kzcYxo1SttA0KYq6yjaKGjZY".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
refundobject
refund.amount_moneyobject
refund.amount_money.amountinteger
refund.amount_money.currencystring
refund.idstring
refund.payment_idstring
refund.reasonstring
refund.statusstring

Also retrieved by: "did the refund actually go through", "check the status of money we sent back", "look up a specific refund".

square.list_refunds

List Square refunds, optionally filtered by status or date range. Use when the user asks what has been refunded or wants a refund history for the account. For a single known refund, use get_refund.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /refunds.

Arguments:

ArgumentTypeRequiredNotes
begin_timestringnoOnly refunds created at or after this RFC 3339 timestamp.
cursorstringnoPagination cursor from a previous page's response.
end_timestringnoOnly refunds created before this RFC 3339 timestamp.
limitintegernoResults per page, max 100. Defaults to 100.
statusstring, one of PENDING, APPROVED, REJECTED, FAILEDnoOnly refunds in this state.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
cursorstring
refundsarray of object
refunds[].amount_moneyobject
refunds[].amount_money.amountinteger
refunds[].amount_money.currencystring
refunds[].idstring
refunds[].payment_idstring
refunds[].statusstring

Also retrieved by: "what have we refunded lately", "show our refund history", "pull up every reversed sale".

square.create_customer

Create a new customer profile in Square. Use when the user wants to add, register, or set up a new customer or buyer before charging them or linking them to an order. Optional name, email, and phone.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /customers.

Arguments:

ArgumentTypeRequiredNotes
email_addressstringnoCustomer's email address, e.g. "jane@example.com".
family_namestringnoCustomer's last name.
given_namestringnoCustomer's first name.
notestringnoInternal note about this customer, not shown to them.
phone_numberstringnoCustomer's phone number.
reference_idstringnoAn id from another system to associate with this customer.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
customerobject
customer.created_atstring
customer.email_addressstring
customer.family_namestring
customer.given_namestring
customer.idstring
customer.phone_numberstring

Also retrieved by: "add a new shopper to square", "set up a profile for this buyer", "register a new client in our system", "onboard someone before we charge them".

square.get_customer

Get one Square customer's details by id: name, email, phone, and notes. Use when the user names a specific customer. For finding customers by email or phone, use search_customers; to browse all of them, use list_customers.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /customers/{{params.customer_id}}.

Arguments:

ArgumentTypeRequiredNotes
customer_idstringyesSquare customer id, e.g. "JDKYHBWT1D4F8MFH63DBMEN8Y4".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
customerobject
customer.created_atstring
customer.email_addressstring
customer.family_namestring
customer.given_namestring
customer.idstring
customer.notestring
customer.phone_numberstring

Also retrieved by: "pull up this shopper's profile", "what's on file for this buyer", "look up their contact info".

square.list_customers

List Square customers on the account, newest or oldest first. Use when the user wants to browse the whole customer base. To filter by email or phone, use search_customers instead.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /customers.

Arguments:

ArgumentTypeRequiredNotes
cursorstringnoPagination cursor from a previous page's response.
limitintegernoResults per page, max 100. Defaults to 100.
sort_fieldstring, one of DEFAULT, CREATED_ATnoField to sort by. Defaults to DEFAULT.
sort_orderstring, one of ASC, DESCnoOldest or newest first. Defaults to ASC.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
cursorstring
customersarray of object
customers[].email_addressstring
customers[].family_namestring
customers[].given_namestring
customers[].idstring
customers[].phone_numberstring

Also retrieved by: "who's in our customer base", "show everyone we've got on file", "browse the full client list".

square.search_customers

Find Square customers by exact email or phone number. Use when the user wants to look someone up by their contact details rather than browse the whole list. For one known customer id, use get_customer.

Class read (reads only). No scopes beyond the connection's defaults. Calls POST /customers/search.

Arguments:

ArgumentTypeRequiredNotes
cursorstringnoPagination cursor from a previous page's response.
email_addressstringnoExact customer email address to match.
limitintegernoResults per page, max 100. Defaults to 100.
phone_numberstringnoExact customer phone number to match.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
cursorstring
customersarray of object
customers[].email_addressstring
customers[].family_namestring
customers[].given_namestring
customers[].idstring
customers[].phone_numberstring

Also retrieved by: "find the buyer with this phone number", "look someone up by their email", "do we have a customer with this contact info".

square.update_customer

Edit an existing Square customer's name, email, phone, or note. Use when the user wants to update, correct, or change a customer's contact details. Only the fields given change; omit others to leave them as is.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls PUT /customers/{{params.customer_id}}.

Arguments:

ArgumentTypeRequiredNotes
customer_idstringyesSquare customer id to update.
email_addressstringnoNew email address.
family_namestringnoNew last name.
given_namestringnoNew first name.
notestringnoNew internal note about this customer.
phone_numberstringnoNew phone number.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
customerobject
customer.email_addressstring
customer.family_namestring
customer.given_namestring
customer.idstring
customer.phone_numberstring

Also retrieved by: "fix their phone number on file", "this shopper's email changed", "correct the contact details we have saved", "change what's on record for them".

square.delete_customer

Permanently delete a Square customer profile. Irreversible; past payments and orders are not deleted with it. Use only when the user explicitly asks to delete or remove a customer record entirely.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /customers/{{params.customer_id}}.

Arguments:

ArgumentTypeRequiredNotes
customer_idstringyesSquare customer id to delete.

Also retrieved by: "wipe this shopper out of square for good", "erase their profile entirely", "remove them from our records completely", "they asked to be forgotten, delete their account".

square.create_catalog_item

Create a new item in the Square catalog with a name and price. Use when the user wants to add, list, or create a new product, item, or menu entry for sale. Optional description and SKU.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /catalog/object.

Arguments:

ArgumentTypeRequiredNotes
currencystringyesThree-letter ISO currency code, e.g. "usd".
descriptionstringnoItem description shown to customers.
idempotency_keystringyesCaller-chosen unique string, at most 128 characters, that makes a retry of this exact call return the first result instead of repeating it. Square rejects the call without it.
namestringyesItem name shown to customers, e.g. "Cold Brew".
price_amountintegeryesPrice in the smallest currency unit, e.g. 450 for $4.50 usd.
skustringnoOptional stock-keeping unit code for this item.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
catalog_objectobject
catalog_object.idstring
catalog_object.item_dataobject
catalog_object.item_data.descriptionstring
catalog_object.item_data.namestring
catalog_object.item_data.variationsarray of object
catalog_object.versioninteger

Also retrieved by: "add a new product to the menu", "list this item for sale", "set up a new thing we sell with a price", "create a menu entry".

square.get_catalog_item

Get one Square catalog item by its object id: name, description, and price. Use when the user names a specific product or menu item. For browsing or keyword lookup, use list_catalog_items or search_catalog_items.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /catalog/object/{{params.object_id}}.

Arguments:

ArgumentTypeRequiredNotes
include_related_objectsbooleannoTrue to also return linked objects like categories or taxes.
object_idstringyesSquare catalog object id, e.g. "W62UWFY35CWMYGVWK6PMGRPX".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
objectobject
object.idstring
object.item_dataobject
object.item_data.descriptionstring
object.item_data.namestring
object.item_data.variationsarray of object
object.versioninteger

Also retrieved by: "look up this product's details", "what's the price on this menu item", "pull up one specific thing we sell".

square.list_catalog_items

List every item in the Square catalog. Use when the user wants to browse the whole menu, product list, or catalog rather than search by keyword. For a keyword or category search, use search_catalog_items.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /catalog/list.

Arguments:

ArgumentTypeRequiredNotes
cursorstringnoPagination cursor from a previous page's response.
typesstringnoComma-separated catalog object types to return, e.g. "ITEM" or "ITEM,CATEGORY". Defaults to "ITEM".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
cursorstring
objectsarray of object
objects[].idstring
objects[].item_dataobject
objects[].item_data.namestring
objects[].item_data.variationsarray of object

Also retrieved by: "show the whole menu", "what products do we carry", "browse everything in our catalog".

square.search_catalog_items

Search Square catalog items by name or category keyword. Use when the user asks to find, look up, or search for a product or menu item by what it's called. For the full catalog, use list_catalog_items.

Class read (reads only). No scopes beyond the connection's defaults. Calls POST /catalog/search-catalog-items.

Arguments:

ArgumentTypeRequiredNotes
category_idsarray of stringnoOnly items in these category ids.
cursorstringnoPagination cursor from a previous page's response.
limitintegernoResults per page, max 100. Defaults to 100.
text_filterstringnoKeyword to match against item names and descriptions.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
cursorstring
itemsarray of object
items[].idstring
items[].item_dataobject
items[].item_data.namestring
items[].item_data.variationsarray of object

Also retrieved by: "find the product called cold brew", "look up items by keyword", "search the menu for something".

square.update_catalog_item

Change an existing Square catalog item's name, description, or price. Use when the user wants to edit, rename, or reprice a product or menu item that already exists. Requires the item's existing object and variation ids.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /catalog/object.

Arguments:

ArgumentTypeRequiredNotes
currencystringyesThree-letter ISO currency code, e.g. "usd".
descriptionstringnoNew item description.
idempotency_keystringyesCaller-chosen unique string, at most 128 characters, that makes a retry of this exact call return the first result instead of repeating it. Square rejects the call without it.
namestringyesNew item name.
object_idstringyesSquare catalog item object id to update.
price_amountintegeryesNew price in the smallest currency unit.
skustringnoNew stock-keeping unit code.
variation_idstringyesSquare catalog item variation object id to update.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
catalog_objectobject
catalog_object.idstring
catalog_object.item_dataobject
catalog_object.item_data.descriptionstring
catalog_object.item_data.namestring
catalog_object.item_data.variationsarray of object
catalog_object.versioninteger

Also retrieved by: "change the price on this product", "rename this menu item", "edit the description for something we sell".

square.delete_catalog_item

Permanently delete an item from the Square catalog. Irreversible; the item and its variations stop being sellable. Use only when the user explicitly asks to delete, remove, or discontinue a product or menu item entirely.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /catalog/object/{{params.object_id}}.

Arguments:

ArgumentTypeRequiredNotes
object_idstringyesSquare catalog object id to delete.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deleted_object_idsarray of string

Also retrieved by: "discontinue this product for good", "take this item off the menu permanently", "remove this thing we sell entirely".

square.create_order

Create a new Square order with one or more line items at a location. Use when the user wants to start, open, or ring up a new order or sale before taking payment. Pay it with pay_order once it's ready.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /orders.

Arguments:

ArgumentTypeRequiredNotes
idempotency_keystringnoCaller-chosen unique string, at most 192 characters, that makes a retry of this exact call return the first result instead of repeating it. Square accepts the call without it, but a retry then creates a second order.
line_itemsarray of objectyesItems being ordered.
line_items[].base_price_moneyobjectyes
line_items[].base_price_money.amountintegerno
line_items[].base_price_money.currencystringno
line_items[].namestringyesLine item name shown on the order.
line_items[].quantitystringyesQuantity as a string, e.g. "2".
location_idstringyesSquare location id this order belongs to.
reference_idstringnoAn id from another system to associate with this order.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
orderobject
order.idstring
order.line_itemsarray of object
order.line_items[].base_price_moneyobject
order.line_items[].namestring
order.line_items[].quantitystring
order.line_items[].uidstring
order.location_idstring
order.statestring
order.total_moneyobject
order.total_money.amountinteger
order.total_money.currencystring

Also retrieved by: "start a new tab for this table", "open a sale with these items", "ring up a new order before payment".

square.get_order

Get one Square order by id: its state, line items, and total. Use when the user asks about a specific order's contents or status. For searching across many orders, use search_orders.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /orders/{{params.order_id}}.

Arguments:

ArgumentTypeRequiredNotes
order_idstringyesSquare order id, e.g. "CAISENgvlJ6jLWAzERDzjyHVybY".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
orderobject
order.idstring
order.line_itemsarray of object
order.line_items[].base_price_moneyobject
order.line_items[].namestring
order.line_items[].quantitystring
order.line_items[].uidstring
order.location_idstring
order.statestring
order.total_moneyobject
order.total_money.amountinteger
order.total_money.currencystring

Also retrieved by: "what's on this order", "pull up the contents of a specific sale", "check the total for this tab".

square.update_order

Change an existing Square order's line items or state, e.g. marking it completed. Use when the user wants to edit, add to, or update an order that hasn't been paid yet. To take payment, use pay_order.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls PUT /orders/{{params.order_id}}.

Arguments:

ArgumentTypeRequiredNotes
line_itemsarray of objectnoReplacement line items for the order.
line_items[].base_price_moneyobjectno
line_items[].base_price_money.amountintegerno
line_items[].base_price_money.currencystringno
line_items[].namestringnoLine item name shown on the order.
line_items[].quantitystringnoQuantity as a string, e.g. "2".
order_idstringyesSquare order id to update.
statestring, one of OPEN, COMPLETED, CANCELEDnoNew order state.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
orderobject
order.idstring
order.statestring
order.total_moneyobject
order.total_money.amountinteger
order.total_money.currencystring

Also retrieved by: "add another item to this open order", "mark this order finished", "change what's on this tab before it's paid".

square.search_orders

Search Square orders across one or more locations, optionally filtered by state. Use when the user asks for a location's recent orders, open tabs, or completed sales. For one known order, use get_order.

Class read (reads only). No scopes beyond the connection's defaults. Calls POST /orders/search.

Arguments:

ArgumentTypeRequiredNotes
cursorstringnoPagination cursor from a previous page's response.
limitintegernoResults per page, max 100. Defaults to 100.
location_idsarray of stringnoOnly orders at these Square location ids.
statestring, one of OPEN, COMPLETED, CANCELEDnoOnly orders in this state.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
cursorstring
ordersarray of object
orders[].idstring
orders[].location_idstring
orders[].statestring
orders[].total_moneyobject
orders[].total_money.amountinteger
orders[].total_money.currencystring

Also retrieved by: "what orders are still open at this location", "show completed sales for today", "browse recent tabs across our stores".

square.pay_order

Settle a Square order by attaching one or more completed payments to it. Use when the user wants to close out, collect on, or finish paying for an order that already has a total. Create the payment first with create_payment.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /orders/{{params.order_id}}/pay.

Arguments:

ArgumentTypeRequiredNotes
idempotency_keystringyesCaller-chosen unique string, at most 192 characters, that makes a retry of this exact call return the first result instead of repeating it. Square rejects the call without it.
order_idstringyesSquare order id to pay.
payment_idsarray of stringyesSquare payment ids to apply toward this order.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
orderobject
order.idstring
order.statestring
order.total_moneyobject
order.total_money.amountinteger
order.total_money.currencystring

Also retrieved by: "close out this tab with the payment we took", "settle this order now that it's paid", "apply this charge to finish the sale".

square.create_invoice

Create a draft invoice in Square for an existing order and customer. Use when the user wants to start, draft, or bill an order to a customer instead of collecting payment on the spot. Send it with publish_invoice once it's ready.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /invoices.

Arguments:

ArgumentTypeRequiredNotes
customer_idstringyesSquare customer id to bill, the invoice's primary recipient.
descriptionstringnoInvoice description shown to the customer.
due_datestringnoDate payment is due, e.g. "2026-08-15".
order_idstringyesSquare order id this invoice bills.
titlestringnoInvoice title shown to the customer.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
invoiceobject
invoice.idstring
invoice.order_idstring
invoice.primary_recipientobject
invoice.primary_recipient.customer_idstring
invoice.public_urlstring
invoice.statusstring
invoice.versioninteger

Also retrieved by: "draft a bill for this customer's order", "start an invoice we can send later", "set up a bill instead of charging them now".

square.get_invoice

Get one Square invoice by id: its status, due date, and hosted payment page url. Use when the user names a specific invoice or bill. For browsing all of them, use list_invoices.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /invoices/{{params.invoice_id}}.

Arguments:

ArgumentTypeRequiredNotes
invoice_idstringyesSquare invoice id, e.g. "inv:0-ChCLK...".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
invoiceobject
invoice.idstring
invoice.order_idstring
invoice.primary_recipientobject
invoice.primary_recipient.customer_idstring
invoice.public_urlstring
invoice.statusstring
invoice.versioninteger

Also retrieved by: "pull up this specific bill", "what's the status of an invoice", "check the payment page link for a bill".

square.list_invoices

List Square invoices for a location. Use when the user asks about unpaid bills, invoice history, or what's been sent to customers. For one known invoice, use get_invoice.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /invoices.

Arguments:

ArgumentTypeRequiredNotes
cursorstringnoPagination cursor from a previous page's response.
limitintegernoResults per page, max 200. Defaults to 100.
location_idstringnoOnly invoices for this Square location id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
cursorstring
invoicesarray of object
invoices[].idstring
invoices[].order_idstring
invoices[].public_urlstring
invoices[].statusstring

Also retrieved by: "what invoices are still unpaid", "show our billing history", "what have we sent to customers".

square.publish_invoice

Publish a draft Square invoice, emailing it to the customer and opening it for payment. Use when the user wants to send, deliver, or issue an invoice that was drafted but not yet sent.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /invoices/{{params.invoice_id}}/publish.

Arguments:

ArgumentTypeRequiredNotes
invoice_idstringyesSquare draft invoice id to publish.
versionintegeryesCurrent invoice version, from create_invoice or get_invoice.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
invoiceobject
invoice.idstring
invoice.public_urlstring
invoice.statusstring

Also retrieved by: "send this draft bill to the customer", "email the invoice so they can pay it", "issue this bill now".

square.cancel_invoice

Cancel a published Square invoice that will never be paid. Irreversible; the invoice stays on record marked canceled instead of being deleted. Use when the user wants to cancel, kill, or void an invoice that was sent by mistake.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls POST /invoices/{{params.invoice_id}}/cancel.

Arguments:

ArgumentTypeRequiredNotes
invoice_idstringyesSquare invoice id to cancel.
versionintegeryesCurrent invoice version, from get_invoice.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
invoiceobject
invoice.idstring
invoice.statusstring

Also retrieved by: "void this bill, it went out by mistake", "kill this invoice, they don't need to pay it", "this bill should never be collected on".

square.delete_invoice

Permanently delete a draft Square invoice that has not been published. Irreversible and only works while the invoice is still a draft. For a published invoice that should never be paid, use cancel_invoice instead.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). No scopes beyond the connection's defaults. Calls DELETE /invoices/{{params.invoice_id}}.

Arguments:

ArgumentTypeRequiredNotes
invoice_idstringyesSquare draft invoice id to delete.
versionintegernoCurrent invoice version, from get_invoice.

Also retrieved by: "scrap this draft bill entirely", "get rid of this invoice before it's sent", "remove this unpublished bill for good".

square.get_inventory_count

Get the current stock count for one Square catalog item variation, optionally at specific locations. Use when the user asks how many of something are left, in stock, or on hand. For several items at once, use batch_get_inventory_counts.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /inventory/{{params.catalog_object_id}}.

Arguments:

ArgumentTypeRequiredNotes
catalog_object_idstringyesSquare catalog item variation id to check stock for.
cursorstringnoPagination cursor from a previous page's response.
location_idsarray of stringnoOnly counts at these Square location ids.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
countsarray of object
counts[].catalog_object_idstring
counts[].location_idstring
counts[].quantitystring
counts[].statestring
cursorstring

Also retrieved by: "how many do we have left of this item", "check the stock on this product", "is this thing still in stock".

square.adjust_inventory

Change the stock count for a Square catalog item variation at a location, e.g. after a delivery or a stock take. Use when the user wants to restock, adjust, correct, or write off inventory. Moves a quantity from one state to another, such as received stock to in stock.

Class write (writes, no confirmation needed). No scopes beyond the connection's defaults. Calls POST /inventory/changes/batch-create.

Arguments:

ArgumentTypeRequiredNotes
catalog_object_idstringyesSquare catalog item variation id being adjusted.
from_statestring, one of NONE, IN_STOCK, SOLD, WASTE, RECEIVED_FROM_VENDORyesInventory state the quantity is moving from.
idempotency_keystringyesCaller-chosen unique string, at most 192 characters, that makes a retry of this exact call return the first result instead of repeating it. Square rejects the call without it.
location_idstringyesSquare location id the stock is at.
quantitystringyesQuantity being moved, as a string, e.g. "10".
to_statestring, one of IN_STOCK, SOLD, WASTE, RECEIVED_FROM_VENDORyesInventory state the quantity is moving to.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
countsarray of object
counts[].catalog_object_idstring
counts[].location_idstring
counts[].quantitystring
counts[].statestring

Also retrieved by: "restock this item after the delivery came in", "correct the count, we did a stock take", "write off some damaged stock", "update how much of this we have on hand".

square.batch_get_inventory_counts

Get stock counts for several Square catalog item variations at once, optionally filtered to specific locations. Use when the user wants a stock report or wants to check several products' inventory together. For a single item, use get_inventory_count.

Class read (reads only). No scopes beyond the connection's defaults. Calls POST /inventory/counts/batch-retrieve.

Arguments:

ArgumentTypeRequiredNotes
catalog_object_idsarray of stringnoSquare catalog item variation ids to check stock for.
cursorstringnoPagination cursor from a previous page's response.
location_idsarray of stringnoOnly counts at these Square location ids.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
countsarray of object
counts[].catalog_object_idstring
counts[].location_idstring
counts[].quantitystring
counts[].statestring
cursorstring

Also retrieved by: "give me a stock report across several products", "check inventory on a bunch of items at once", "what's on hand for these products together".