Square

App · E-Commerce · 26 actions

Manage Square customers and their groups, catalog items and stock, orders, invoices, payments, payment links and refunds, and start workflows on new orders, payments, paid invoices and new customers.

Actions

ActionWhat it does
Add customer to groupPut a Square customer in one of your customer groups.
Adjust stockAdd stock you received to a Square item at a location, or take some off as sold or as damaged or lost.
Cancel invoiceCancel a sent Square invoice that hasn't been paid, so the customer can no longer pay it.
Create customerCreate a Square customer profile.
Create invoiceMake a draft Square invoice asking a customer to pay for one item by a due date.
Create orderOpen a Square order for one item at a price you set, optionally for a customer.
Create payment linkCreate a Square-hosted payment link to charge a single custom amount.
Delete customerDelete a customer profile from Square.
Delete draft invoiceDelete a Square invoice that hasn't been sent yet.
Get customerGet one Square customer's details: name, email, phone, company, note and the groups they're in.
Get invoiceGet one Square invoice: its status, customer, amount, due date and payment link.
Get orderRetrieve a Square order by ID.
Get paymentGet one Square payment: how much, how it was paid, its status and receipt link.
Get stock countSee how many of an item Square has in stock at a location.
List catalog itemsList catalog items.
List customer groupsList the customer groups set up in your Square account.
List invoicesList a Square location's invoices, drafts included.
List locationsList Square business locations.
List paymentsList Square payments, newest first, optionally only those taken between two times.
Refund paymentGive money back on a Square payment: all of it or part.
Remove customer from groupTake a Square customer out of one of your customer groups.
Search customersFind Square customers by email address, phone number or your own reference ID.
Search ordersSearch orders.
Send invoiceSend a draft Square invoice.
Set stock countRecord how many of a Square item you counted at a location; Square's stock becomes that number.
Update customerChange a Square customer's name, email, phone number or note.

Add customer to group

Put a Square customer in one of your customer groups. A customer already in it stays as they are.

Inputs

Customer IDcustomer_idtextRequired
The customer, by the ID Create customer or Search customers gave back.
Customer groupgroup_idtextRequired
The customer group, picked from your Square account.

Outputs

resultobject
What changed.
Example output
{
  "result": {
    "added": true,
    "customer_id": "cust_123",
    "group_id": "group_123"
  }
}

Adjust stock

Add stock you received to a Square item at a location, or take some off as sold or as damaged or lost.

Inputs

Item variation IDcatalog_object_idtextRequired
The item variation whose stock to use, such as one size of a shirt. List catalog items with the item type ITEM_VARIATION gives these IDs.
Location IDlocation_idtextRequired
The Square location, by the ID List locations gives.
QuantityquantitynumberRequired
How many to add or take off; more than zero.
What happenedreasontext
Received adds the quantity to stock; Sold and Damaged or lost take it off.One of: RECEIVED, SOLD, WASTE (Damaged or lost). Default: RECEIVED.

Outputs

inventoryobject
The item's stock at the location.
Example output
{
  "inventory": {
    "catalog_object_id": "variation_123",
    "counts": [
      {
        "calculated_at": "2026-11-30T15:04:05Z",
        "quantity": "22",
        "state": "IN_STOCK"
      }
    ],
    "in_stock": 22.0,
    "location_id": "location_123"
  }
}

Cancel invoice

Cancel a sent Square invoice that hasn't been paid, so the customer can no longer pay it. A draft can't be canceled: use Delete draft invoice.

Inputs

Invoice IDinvoice_idtextRequired
The invoice, by the ID Create invoice or List invoices gave back.

Outputs

invoiceobject
The invoice.
Example output
{
  "invoice": {
    "created_at": "2026-11-30T15:04:05Z",
    "delivery_method": "EMAIL",
    "description": "Thank you for your business.",
    "id": "inv:0-ChAbc123",
    "invoice_number": "000001",
    "location_id": "location_123",
    "next_payment_amount_money": {
      "amount": 12500,
      "currency": "USD"
    },
    "order_id": "order_123",
    "payment_requests": [
      {
        "computed_amount_money": {
          "amount": 12500,
          "currency": "USD"
        },
        "due_date": "2026-12-15",
        "request_type": "BALANCE"
      }
    ],
    "primary_recipient": {
      "customer_id": "cust_123",
      "email_address": "jane@example.com",
      "family_name": "Doe",
      "given_name": "Jane"
    },
    "public_url": "https://squareup.com/pay-invoice/inv:0-ChAbc123",
    "status": "CANCELED",
    "title": "Catering order",
    "updated_at": "2026-11-30T15:05:00Z",
    "version": 1
  }
}

Create customer

Create a Square customer profile.

Inputs

First namegiven_nametextRequired
Customer first name.
Last namefamily_nametext
Customer last name.
Email addressemail_addresstext
Customer email address.
Phone numberphone_numbertext
Customer phone number.

Outputs

customerobject
Created customer record.
Example output
{
  "customer": {
    "family_name": "Doe",
    "given_name": "Jane",
    "id": "cust_123"
  }
}

Create invoice

Make a draft Square invoice asking a customer to pay for one item by a due date. A draft isn't sent: use Send invoice to send it. Square makes an order for the item to go with it.

Inputs

Location IDlocation_idtextRequired
The Square location, by the ID List locations gives.
Customer IDcustomer_idtextRequired
The customer to bill, by the ID Create customer or Search customers gives. To have Square email the invoice, the customer needs an email address.
Item nameitem_nametextRequired
What the invoice is for, as the customer will see it.
AmountamountnumberRequired
How much to bill, in the smallest currency unit (e.g. cents for USD, so 12500 is $125.00).At least 1.
CurrencycurrencytextRequired
Three-letter currency code, such as USD.
Due datedue_datedateRequired
The day payment is due.
How to send itdelivery_methodtext
Email: once sent, Square emails the invoice to the customer. Share it yourself: Square sends nothing, and you share its payment link.One of: EMAIL, SHARE_MANUALLY (Share it yourself). Default: EMAIL.
Titletitletext
A title for the invoice, such as the job's name.
Descriptiondescriptiontext
A message to show on the invoice.

Outputs

invoiceobject
The invoice.
Example output
{
  "invoice": {
    "created_at": "2026-11-30T15:04:05Z",
    "delivery_method": "EMAIL",
    "description": "Thank you for your business.",
    "id": "inv:0-ChAbc123",
    "invoice_number": "000001",
    "location_id": "location_123",
    "next_payment_amount_money": {
      "amount": 12500,
      "currency": "USD"
    },
    "order_id": "order_123",
    "payment_requests": [
      {
        "computed_amount_money": {
          "amount": 12500,
          "currency": "USD"
        },
        "due_date": "2026-12-15",
        "request_type": "BALANCE"
      }
    ],
    "primary_recipient": {
      "customer_id": "cust_123",
      "email_address": "jane@example.com",
      "family_name": "Doe",
      "given_name": "Jane"
    },
    "public_url": "https://squareup.com/pay-invoice/inv:0-ChAbc123",
    "status": "DRAFT",
    "title": "Catering order",
    "updated_at": "2026-11-30T15:05:00Z",
    "version": 1
  }
}

Create order

Open a Square order for one item at a price you set, optionally for a customer. It isn't paid yet; nothing is charged.

Inputs

Location IDlocation_idtextRequired
The Square location, by the ID List locations gives.
Item nameitem_nametextRequired
What the order is for, as the customer will see it.
PriceamountnumberRequired
The price of one, in the smallest currency unit (e.g. cents for USD, so 1250 is $12.50).At least 1.
CurrencycurrencytextRequired
Three-letter currency code, such as USD.
Quantityquantitynumber
How many. Defaults to 1.At least 1.
Customer IDcustomer_idtext
The customer the order is for, by the ID Search customers gives.
Notenotetext
A note on the item, such as a size or a request.

Outputs

orderobject
The new order.
Example output
{
  "order": {
    "created_at": "2026-11-30T15:04:05Z",
    "customer_id": "cust_123",
    "id": "order_123",
    "location_id": "location_123",
    "state": "OPEN",
    "total": 25.0,
    "total_money": {
      "amount": 2500,
      "currency": "USD"
    }
  }
}

Create a Square-hosted payment link to charge a single custom amount.

Inputs

Location IDlocation_idtextRequired
Square location ID to associate with the checkout.
AmountamountnumberRequired
Amount to charge, in the smallest currency unit (e.g. cents for USD).At least 1.
CurrencycurrencytextRequired
ISO 4217 currency code, such as USD.

Outputs

payment_linkobject
Created payment link.
Example output
{
  "payment_link": {
    "id": "plink_123",
    "order_id": "order_123",
    "url": "https://square.link/u/example"
  }
}

Delete customer

Delete a customer profile from Square. Their past orders and payments stay.

Inputs

Customer IDcustomer_idtextRequired
The customer, by the ID Create customer or Search customers gave back.

Outputs

resultobject
What was deleted.
Example output
{
  "result": {
    "customer_id": "cust_123",
    "deleted": true
  }
}

Delete draft invoice

Delete a Square invoice that hasn't been sent yet. Square cancels the order that went with it. A sent invoice can only be canceled.

Inputs

Invoice IDinvoice_idtextRequired
The invoice, by the ID Create invoice or List invoices gave back.

Outputs

resultobject
What was deleted.
Example output
{
  "result": {
    "deleted": true,
    "invoice_id": "inv:0-ChAbc123"
  }
}

Get customer

Get one Square customer's details: name, email, phone, company, note and the groups they're in.

Inputs

Customer IDcustomer_idtextRequired
The customer, by the ID Create customer or Search customers gave back.

Outputs

customerobject
The customer.
Example output
{
  "customer": {
    "company_name": "Doe Bakery",
    "created_at": "2026-11-01T15:04:05Z",
    "email_address": "jane@example.com",
    "family_name": "Doe",
    "given_name": "Jane",
    "group_ids": [
      "group_123"
    ],
    "id": "cust_123",
    "note": "Prefers email.",
    "phone_number": "+15555550123",
    "reference_id": "crm-42"
  }
}

Get invoice

Get one Square invoice: its status, customer, amount, due date and payment link.

Inputs

Invoice IDinvoice_idtextRequired
The invoice, by the ID Create invoice or List invoices gave back.

Outputs

invoiceobject
The invoice.
Example output
{
  "invoice": {
    "created_at": "2026-11-30T15:04:05Z",
    "delivery_method": "EMAIL",
    "description": "Thank you for your business.",
    "id": "inv:0-ChAbc123",
    "invoice_number": "000001",
    "location_id": "location_123",
    "next_payment_amount_money": {
      "amount": 12500,
      "currency": "USD"
    },
    "order_id": "order_123",
    "payment_requests": [
      {
        "computed_amount_money": {
          "amount": 12500,
          "currency": "USD"
        },
        "due_date": "2026-12-15",
        "request_type": "BALANCE"
      }
    ],
    "primary_recipient": {
      "customer_id": "cust_123",
      "email_address": "jane@example.com",
      "family_name": "Doe",
      "given_name": "Jane"
    },
    "public_url": "https://squareup.com/pay-invoice/inv:0-ChAbc123",
    "status": "UNPAID",
    "title": "Catering order",
    "updated_at": "2026-11-30T15:05:00Z",
    "version": 1
  }
}

Get order

Retrieve a Square order by ID.

Inputs

Order IDorder_idtextRequired
Square order ID.

Outputs

orderobject
Order details.
Example output
{
  "order": {
    "id": "order_123",
    "state": "COMPLETED",
    "total_money": {
      "amount": 2500,
      "currency": "USD"
    }
  }
}

Get payment

Get one Square payment: how much, how it was paid, its status and receipt link.

Inputs

Payment IDpayment_idtextRequired
The payment, by the ID New payment, List payments or an order's tenders give.

Outputs

paymentobject
The payment.
Example output
{
  "payment": {
    "amount": 25.0,
    "amount_money": {
      "amount": 2500,
      "currency": "USD"
    },
    "created_at": "2026-11-30T15:04:05Z",
    "customer_id": "cust_123",
    "id": "pay_123",
    "location_id": "location_123",
    "note": "Table 4",
    "order_id": "order_123",
    "receipt_url": "https://squareup.com/receipt/preview/pay_123",
    "source_type": "CARD",
    "status": "COMPLETED"
  }
}

Get stock count

See how many of an item Square has in stock at a location.

Inputs

Item variation IDcatalog_object_idtextRequired
The item variation whose stock to use, such as one size of a shirt. List catalog items with the item type ITEM_VARIATION gives these IDs.
Location IDlocation_idtextRequired
The Square location, by the ID List locations gives.

Outputs

inventoryobject
The item's stock at the location.
Example output
{
  "inventory": {
    "catalog_object_id": "variation_123",
    "counts": [
      {
        "calculated_at": "2026-11-30T15:04:05Z",
        "quantity": "22",
        "state": "IN_STOCK"
      }
    ],
    "in_stock": 22.0,
    "location_id": "location_123"
  }
}

List catalog items

List catalog items.

Inputs

Item typestypeslist
The kinds of catalog objects to include, such as ITEM, CATEGORY, or DISCOUNT. Defaults to ITEM.

Outputs

itemslist
Catalog items.
Example output
{
  "items": [
    {
      "id": "item_123",
      "name": "Coffee",
      "type": "ITEM"
    }
  ]
}

List customer groups

List the customer groups set up in your Square account.

Inputs

None.

Outputs

groupslist
The customer groups.
Example output
{
  "groups": [
    {
      "id": "group_123",
      "name": "Regulars"
    }
  ]
}

List invoices

List a Square location's invoices, drafts included.

Inputs

Location IDlocation_idtextRequired
The Square location, by the ID List locations gives.
Limitlimitnumber
The most invoices to list, up to 200. Defaults to 200.From 1 to 200.

Outputs

countnumber
How many were listed.
invoiceslist
The invoices.
Example output
{
  "count": 1,
  "invoices": [
    {
      "created_at": "2026-11-30T15:04:05Z",
      "delivery_method": "EMAIL",
      "description": "Thank you for your business.",
      "id": "inv:0-ChAbc123",
      "invoice_number": "000001",
      "location_id": "location_123",
      "next_payment_amount_money": {
        "amount": 12500,
        "currency": "USD"
      },
      "order_id": "order_123",
      "payment_requests": [
        {
          "computed_amount_money": {
            "amount": 12500,
            "currency": "USD"
          },
          "due_date": "2026-12-15",
          "request_type": "BALANCE"
        }
      ],
      "primary_recipient": {
        "customer_id": "cust_123",
        "email_address": "jane@example.com",
        "family_name": "Doe",
        "given_name": "Jane"
      },
      "public_url": "https://squareup.com/pay-invoice/inv:0-ChAbc123",
      "status": "UNPAID",
      "title": "Catering order",
      "updated_at": "2026-11-30T15:05:00Z",
      "version": 1
    }
  ]
}

List locations

List Square business locations.

Inputs

None.

Outputs

locationslist
Square locations.
Example output
{
  "locations": [
    {
      "id": "location_123",
      "name": "Downtown Store",
      "status": "ACTIVE"
    }
  ]
}

List payments

List Square payments, newest first, optionally only those taken between two times.

Inputs

Location IDlocation_idtext
Only this location's payments, by the ID List locations gives. Leave blank for your main location.
Taken frombegin_timedate and time
Only payments taken at or after this time.
Taken beforeend_timedate and time
Only payments taken before this time.
Limitlimitnumber
The most payments to list, up to 200. Defaults to 100.From 1 to 200.

Outputs

countnumber
How many were listed.
paymentslist
The payments, newest first.
Example output
{
  "count": 1,
  "payments": [
    {
      "amount": 25.0,
      "amount_money": {
        "amount": 2500,
        "currency": "USD"
      },
      "created_at": "2026-11-30T15:04:05Z",
      "customer_id": "cust_123",
      "id": "pay_123",
      "location_id": "location_123",
      "note": "Table 4",
      "order_id": "order_123",
      "receipt_url": "https://squareup.com/receipt/preview/pay_123",
      "source_type": "CARD",
      "status": "COMPLETED"
    }
  ]
}

Refund payment

Give money back on a Square payment: all of it or part. The money goes back to the card or account that paid.

Inputs

Payment IDpayment_idtextRequired
The payment to refund. An order's tenders list the payment IDs that paid for it (Get order shows them).
AmountamountnumberRequired
How much to refund, in the smallest currency unit (e.g. cents for USD). Square needs it even for a full refund, and it can't be more than what was paid.At least 1.
CurrencycurrencytextRequired
The payment's currency code, such as USD.
Reasonreasontext
Optional reason for the refund, up to 192 characters.

Outputs

refundobject
The refund.
Example output
{
  "refund": {
    "amount_money": {
      "amount": 500,
      "currency": "USD"
    },
    "id": "refund_123",
    "order_id": "order_123",
    "payment_id": "pay_123",
    "status": "PENDING"
  }
}

Remove customer from group

Take a Square customer out of one of your customer groups. The customer and the group both stay.

Inputs

Customer IDcustomer_idtextRequired
The customer, by the ID Create customer or Search customers gave back.
Customer groupgroup_idtextRequired
The customer group, picked from your Square account.

Outputs

resultobject
What changed.
Example output
{
  "result": {
    "customer_id": "cust_123",
    "group_id": "group_123",
    "removed": true
  }
}

Search customers

Find Square customers by email address, phone number or your own reference ID. Fill in at least one; with more than one, a customer must match them all.

Inputs

Email addressquery_texttext
All or part of the customer's email address. Leave blank to search by phone number or reference ID.
Phone numberphone_numbertext
Beta. All or part of the customer's phone number.
Reference IDreference_idtext
Beta. The reference your own system saved on the customer, matched exactly.

Outputs

customerslist
Customer records.
Example output
{
  "customers": [
    {
      "family_name": "Doe",
      "given_name": "Jane",
      "id": "cust_123"
    }
  ]
}

Search orders

Search orders. Alongside the orders it returns how many were found, their total_sales and the average_order, each with a ready-to-read display twin (beta), so a daily sales message needs no arithmetic.

Inputs

Location IDlocation_idtextRequired
Square location ID to search for orders.
Statesstateslist
Optional order states to filter by, such as OPEN, COMPLETED, or CANCELED.
Closed fromclosed_fromdate
Only orders closed on or after this day, by the location's own clock. Use with Closed to for one day's sales.
Closed toclosed_todate
Only orders closed on or before this day, by the location's own clock. For a single day, give the same day as Closed from.
Customer IDcustomer_idtext
Beta. Only this customer's orders, by the ID Search customers or New customer gives.

Outputs

average_ordernumber
Beta. What an order came to on average, in dollars (or the currency's main unit); 0 when no orders were found.
average_order_displaytext
Beta. average_order as a person writes it ($41.25), ready to put in a message.
countnumber
How many orders were found.
currencytext
The currency of the totals, such as USD.
orderslist
Order results.
total_salesnumber
All the orders' totals added up, in dollars (or the currency's main unit).
total_sales_displaytext
Beta. total_sales as a person writes it ($1,240.50), ready to put in a message.
Example output
{
  "average_order": 25.0,
  "average_order_display": "$25.00",
  "count": 1,
  "currency": "USD",
  "orders": [
    {
      "id": "order_123",
      "state": "COMPLETED",
      "total": 25.0,
      "total_money": {
        "amount": 2500,
        "currency": "USD"
      }
    }
  ],
  "total_sales": 25.0,
  "total_sales_display": "$25.00"
}

Send invoice

Send a draft Square invoice. One set to Email is emailed to the customer with a link to pay; for one you share yourself, Square sends nothing and the invoice's payment page link is ready to share.

Inputs

Invoice IDinvoice_idtextRequired
The invoice, by the ID Create invoice or List invoices gave back.

Outputs

invoiceobject
The invoice.
Example output
{
  "invoice": {
    "created_at": "2026-11-30T15:04:05Z",
    "delivery_method": "EMAIL",
    "description": "Thank you for your business.",
    "id": "inv:0-ChAbc123",
    "invoice_number": "000001",
    "location_id": "location_123",
    "next_payment_amount_money": {
      "amount": 12500,
      "currency": "USD"
    },
    "order_id": "order_123",
    "payment_requests": [
      {
        "computed_amount_money": {
          "amount": 12500,
          "currency": "USD"
        },
        "due_date": "2026-12-15",
        "request_type": "BALANCE"
      }
    ],
    "primary_recipient": {
      "customer_id": "cust_123",
      "email_address": "jane@example.com",
      "family_name": "Doe",
      "given_name": "Jane"
    },
    "public_url": "https://squareup.com/pay-invoice/inv:0-ChAbc123",
    "status": "UNPAID",
    "title": "Catering order",
    "updated_at": "2026-11-30T15:05:00Z",
    "version": 1
  }
}

Set stock count

Record how many of a Square item you counted at a location; Square's stock becomes that number.

Inputs

Item variation IDcatalog_object_idtextRequired
The item variation whose stock to use, such as one size of a shirt. List catalog items with the item type ITEM_VARIATION gives these IDs.
Location IDlocation_idtextRequired
The Square location, by the ID List locations gives.
QuantityquantitynumberRequired
How many you counted; zero or more.At least 0.

Outputs

inventoryobject
The item's stock at the location.
Example output
{
  "inventory": {
    "catalog_object_id": "variation_123",
    "counts": [
      {
        "calculated_at": "2026-11-30T15:04:05Z",
        "quantity": "22",
        "state": "IN_STOCK"
      }
    ],
    "in_stock": 22.0,
    "location_id": "location_123"
  }
}

Update customer

Change a Square customer's name, email, phone number or note. Only the details you fill in change.

Inputs

Customer IDcustomer_idtextRequired
The customer, by the ID Create customer or Search customers gave back.
First namegiven_nametext
The customer's new first name.
Last namefamily_nametext
The customer's new last name.
Email addressemail_addresstext
The customer's new email address.
Phone numberphone_numbertext
The customer's new phone number.
Notenotetext
A note about the customer, which replaces any note there.

Outputs

customerobject
The customer as it is now.
Example output
{
  "customer": {
    "email_address": "jane@example.com",
    "family_name": "Doe",
    "given_name": "Jane",
    "id": "cust_123",
    "note": "Prefers email.",
    "phone_number": "+15555550123"
  }
}

On this page