Square
API actions for the Square integration.
Square
Manage Square customers, catalog, orders, and payment links via OAuth.
Create customer
Create a Square customer profile.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
given_name | string | Yes | Customer first name. |
family_name | string | Yes | Customer last name. |
email_address | string | No | Customer email address. |
phone_number | string | No | Customer phone number. |
Response
{
"customer_id": "cust_123"
}Create payment link
Create a Square payment link for checkout.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
location_id | string | No | Square location ID. |
line_items | array | Yes | Line items for checkout. |
description | string | No | Checkout description. |
Response
{
"order_id": "order_123",
"url": "https://square.link/u/example"
}List catalog items
List Square catalog items.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
types | array | No | Catalog object types to include. |
limit | number | No | Maximum number of catalog items. |
Response
{
"items": [
{
"id": "item_123",
"name": "Coffee",
"type": "ITEM"
}
]
}List locations
List Square business locations.
Response
{
"locations": [
{
"id": "location_123",
"name": "Downtown Store",
"status": "ACTIVE"
}
]
}Retrieve order
Retrieve a Square order by ID.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
order_id | string | Yes | Square order ID. |
Response
{
"order": {
"id": "order_123",
"state": "COMPLETED",
"total_money": {
"amount": 2500,
"currency": "USD"
}
}
}Search customers
Search Square customers by query.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | No | Search query text. |
limit | number | No | Maximum number of customers to return. |
Response
{
"customers": [
{
"family_name": "Doe",
"given_name": "Jane",
"id": "cust_123"
}
]
}Search orders
Search Square orders.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
location_ids | array | No | Location IDs to search. |
limit | number | No | Maximum number of orders. |
Response
{
"orders": [
{
"id": "order_123",
"state": "COMPLETED",
"total_money": {
"amount": 2500,
"currency": "USD"
}
}
]
}