Square Connect API
Client library for accessing the Square Connect APIs
- Homepage
- https://api.apis.guru/v2/specs/squareup.com/2.0.json
- Provider
- squareup.com
- OpenAPI version
- 3.0.0
- Spec (JSON)
- https://api.apis.guru/v2/specs/squareup.com/2.0/openapi.json
- Spec (YAML)
- https://api.apis.guru/v2/specs/squareup.com/2.0/openapi.yaml
Tools (202)
Extracted live via the executor SDK.
-
applePay.registerDomainActivates a domain for use with Apple Pay on the Web and Square. A validation is performed on this domain by Apple to ensure that it is properly set up as an Apple Pay enabled domain.
This endpoint provides an easy way for platform developers to bulk activate Apple Pay on the Web with Square for merchants using their platform.
To learn more about Web Apple Pay, see .
-
bankAccounts.getBankAccountReturns details of a linked to a Square account.
-
bankAccounts.getBankAccountByV1IdReturns details of a identified by V1 bank account ID.
-
bankAccounts.listBankAccountsReturns a list of objects linked to a Square account.
-
bookings.cancelBookingCancels an existing booking.
-
bookings.createBookingCreates a booking.
-
bookings.listTeamMemberBookingProfilesLists booking profiles for team members.
-
bookings.retrieveBookingRetrieves a booking.
-
bookings.retrieveBusinessBookingProfileRetrieves a seller's booking profile.
-
bookings.retrieveTeamMemberBookingProfileRetrieves a team member's booking profile.
-
bookings.searchAvailabilitySearches for availabilities for booking.
-
bookings.updateBookingUpdates a booking.
-
cards.createCardAdds a card on file to an existing merchant.
-
cards.disableCardDisables the card, preventing any further updates or charges. Disabling an already disabled card is allowed but has no effect.
-
cards.listCardsRetrieves a list of cards owned by the account making the request. A max of 25 cards will be returned.
-
cards.retrieveCardRetrieves details for a specific Card.
-
cashDrawers.listCashDrawerShiftEventsProvides a paginated list of events for a single cash drawer shift.
-
cashDrawers.listCashDrawerShiftsProvides the details for all of the cash drawer shifts for a location in a date range.
-
cashDrawers.retrieveCashDrawerShiftProvides the summary details for a single cash drawer shift. See for a list of cash drawer shift events.
-
catalog.batchDeleteCatalogObjectsDeletes a set of s based on the provided list of target IDs and returns a set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a CatalogItem will also delete all of its children.
BatchDeleteCatalogObjectssucceeds even if only a portion of the targeted IDs can be deleted. The response will only include IDs that were actually deleted. -
catalog.batchRetrieveCatalogObjectsReturns a set of objects based on the provided ID. Each returned in the set includes all of its child information including: all of its objects, references to its objects, and the ids of any objects that apply to it.
-
catalog.batchUpsertCatalogObjectsCreates or updates up to 10,000 target objects based on the provided list of objects. The target objects are grouped into batches and each batch is inserted/updated in an all-or-nothing manner. If an object within a batch is malformed in some way, or violates a database constraint, the entire batch containing that item will be disregarded. However, other batches in the same request may still succeed. Each batch may contain up to 1,000 objects, and batches will be processed in order as long as the total object count for the request (items, variations, modifier lists, discounts, and taxes) is no more than 10,000.
-
catalog.catalogInfoRetrieves information about the Square Catalog API, such as batch size limits that can be used by the
BatchUpsertCatalogObjectsendpoint. -
catalog.deleteCatalogObjectDeletes a single based on the provided ID and returns the set of successfully deleted IDs in the response. Deletion is a cascading event such that all children of the targeted object are also deleted. For example, deleting a will also delete all of its children.
-
catalog.listCatalogReturns a list of s that includes all objects of a set of desired types (for example, all and objects) in the catalog. The
typesparameter is specified as a comma-separated list of valid types:ITEM,ITEM_VARIATION,MODIFIER,MODIFIER_LIST,CATEGORY,DISCOUNT,TAX,IMAGE.Important: ListCatalog does not return deleted catalog items. To retrieve deleted catalog items, use and set the
include_deleted_objectsattribute value totrue. -
catalog.retrieveCatalogObjectReturns a single as a based on the provided ID. The returned object includes all of the relevant information including: children, references to its objects, and the ids of any objects that apply to it.
-
catalog.searchCatalogItemsSearches for catalog items or item variations by matching supported search attribute values, including custom attribute values, against one or more of the specified query expressions.
This (
SearchCatalogItems) endpoint differs from the endpoint in the following aspects:SearchCatalogItemscan only search for items or item variations, whereasSearchCatalogObjectscan search for any type of catalog objects.SearchCatalogItemssupports the custom attribute query filters to return items or item variations that contain custom attribute values, whereSearchCatalogObjectsdoes not.SearchCatalogItemsdoes not support theinclude_deleted_objectsfilter to search for deleted items or item variations, whereasSearchCatalogObjectsdoes.- The both endpoints use different call conventions, including the query filter formats.
-
catalog.searchCatalogObjectsSearches for of any type by matching supported search attribute values, excluding custom attribute values on items or item variations, against one or more of the specified query expressions.
This (
SearchCatalogObjects) endpoint differs from the endpoint in the following aspects:SearchCatalogItemscan only search for items or item variations, whereasSearchCatalogObjectscan search for any type of catalog objects.SearchCatalogItemssupports the custom attribute query filters to return items or item variations that contain custom attribute values, whereSearchCatalogObjectsdoes not.SearchCatalogItemsdoes not support theinclude_deleted_objectsfilter to search for deleted items or item variations, whereasSearchCatalogObjectsdoes.- The both endpoints have different call conventions, including the query filter formats.
-
catalog.updateItemModifierListsUpdates the objects that apply to the targeted without having to perform an upsert on the entire item.
-
catalog.updateItemTaxesUpdates the objects that apply to the targeted without having to perform an upsert on the entire item.
-
catalog.upsertCatalogObjectCreates or updates the target .
-
checkout.createCheckoutLinks a
checkoutIdto acheckout_page_urlthat customers are directed to in order to provide their payment information using a payment processing workflow hosted on connect.squareup.com. -
customerGroups.createCustomerGroupCreates a new customer group for a business.
The request must include the
namevalue of the group. -
customerGroups.deleteCustomerGroupDeletes a customer group as identified by the
group_idvalue. -
customerGroups.listCustomerGroupsRetrieves the list of customer groups of a business.
-
customerGroups.retrieveCustomerGroupRetrieves a specific customer group as identified by the
group_idvalue. -
customerGroups.updateCustomerGroupUpdates a customer group as identified by the
group_idvalue. -
customers.addGroupToCustomerAdds a group membership to a customer.
The customer is identified by the
customer_idvalue and the customer group is identified by thegroup_idvalue. -
customers.createCustomerCreates a new customer for a business.
You must provide at least one of the following values in your request to this endpoint:
given_namefamily_namecompany_nameemail_addressphone_number
-
customers.createCustomerCardAdds a card on file to an existing customer.
As with charges, calls to
CreateCustomerCardare idempotent. Multiple calls with the same card nonce return the same card record that was created with the provided nonce during the first call. -
customers.deleteCustomerDeletes a customer profile from a business. This operation also unlinks any associated cards on file.
As a best practice, you should include the
versionfield in the request to enable control. The value must be set to the current version of the customer profile.To delete a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
-
customers.deleteCustomerCardRemoves a card on file from a customer.
-
customers.listCustomersLists customer profiles associated with a Square account.
Under normal operating conditions, newly created or updated customer profiles become available for the listing operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages.
-
customers.removeGroupFromCustomerRemoves a group membership from a customer.
The customer is identified by the
customer_idvalue and the customer group is identified by thegroup_idvalue. -
customers.retrieveCustomerReturns details for a single customer.
-
customers.searchCustomersSearches the customer profiles associated with a Square account using a supported query filter.
Calling
SearchCustomerswithout any explicit query filter returns all customer profiles ordered alphabetically based ongiven_nameandfamily_name.Under normal operating conditions, newly created or updated customer profiles become available for the search operation in well under 30 seconds. Occasionally, propagation of the new or updated profiles can take closer to one minute or longer, especially during network incidents and outages.
-
customers.updateCustomerUpdates a customer profile. To change an attribute, specify the new value. To remove an attribute, specify the value as an empty string or empty object.
As a best practice, you should include the
versionfield in the request to enable control. The value must be set to the current version of the customer profile.To update a customer profile that was created by merging existing profiles, you must use the ID of the newly created profile.
You cannot use this endpoint to change cards on file. To make changes, use the or .
-
customerSegments.listCustomerSegmentsRetrieves the list of customer segments of a business.
-
customerSegments.retrieveCustomerSegmentRetrieves a specific customer segment as identified by the
segment_idvalue. -
devices.createDeviceCodeCreates a DeviceCode that can be used to login to a Square Terminal device to enter the connected terminal mode.
-
devices.getDeviceCodeRetrieves DeviceCode with the associated ID.
-
devices.listDeviceCodesLists all DeviceCodes associated with the merchant.
-
disputes.acceptDisputeAccepts the loss on a dispute. Square returns the disputed amount to the cardholder and updates the dispute state to ACCEPTED.
Square debits the disputed amount from the seller’s Square account. If the Square account does not have sufficient funds, Square debits the associated bank account.
-
disputes.createDisputeEvidenceTextUploads text to use as evidence for a dispute challenge.
-
disputes.deleteDisputeEvidenceRemoves specified evidence from a dispute.
Square does not send the bank any evidence that is removed. Also, you cannot remove evidence after submitting it to the bank using .
-
disputes.listDisputeEvidenceReturns a list of evidence associated with a dispute.
-
disputes.listDisputesReturns a list of disputes associated with a particular account.
-
disputes.retrieveDisputeReturns details about a specific dispute.
-
disputes.retrieveDisputeEvidenceReturns the evidence metadata specified by the evidence ID in the request URL path
You must maintain a copy of the evidence you upload if you want to reference it later. You cannot download the evidence after you upload it.
-
disputes.submitEvidenceSubmits evidence to the cardholder's bank.
Before submitting evidence, Square compiles all available evidence. This includes evidence uploaded using the and endpoints and evidence automatically provided by Square, when available.
-
employees.getV2Employees -
employees.getV2EmployeesId -
giftCardActivities.createGiftCardActivityCreates a gift card activity. For more information, see and .
-
giftCardActivities.listGiftCardActivitiesLists gift card activities. By default, you get gift card activities for all gift cards in the seller's account. You can optionally specify query parameters to filter the list. For example, you can get a list of gift card activities for a gift card, for all gift cards in a specific region, or for activities within a time window.
-
giftCards.createGiftCardCreates a digital gift card or registers a physical (plastic) gift card. You must activate the gift card before it can be used for payment. For more information, see .
-
giftCards.linkCustomerToGiftCardLinks a customer to a gift card
-
giftCards.listGiftCardsLists all gift cards. You can specify optional filters to retrieve a subset of the gift cards.
-
giftCards.retrieveGiftCardRetrieves a gift card using its ID.
-
giftCards.retrieveGiftCardFromGanRetrieves a gift card using the gift card account number (GAN).
-
giftCards.retrieveGiftCardFromNonceRetrieves a gift card using a nonce (a secure token) that represents the gift card.
-
giftCards.unlinkCustomerFromGiftCardUnlinks a customer from a gift card
-
inventory.batchChangeInventoryApplies adjustments and counts to the provided item quantities.
On success: returns the current calculated counts for all objects referenced in the request. On failure: returns a list of related errors.
-
inventory.batchRetrieveInventoryChangesReturns historical physical counts and adjustments based on the provided filter criteria.
Results are paginated and sorted in ascending order according their
occurred_attimestamp (oldest first).BatchRetrieveInventoryChanges is a catch-all query endpoint for queries that cannot be handled by other, simpler endpoints.
-
inventory.batchRetrieveInventoryCountsReturns current counts for the provided s at the requested s.
Results are paginated and sorted in descending order according to their
calculated_attimestamp (newest first).When
updated_afteris specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a "sync" operation, for example in response to receiving a Webhook notification. -
inventory.deprecatedBatchChangeInventoryDeprecated version of after the endpoint URL is updated to conform to the standard convention.
-
inventory.deprecatedBatchRetrieveInventoryChangesDeprecated version of after the endpoint URL is updated to conform to the standard convention.
-
inventory.deprecatedBatchRetrieveInventoryCountsDeprecated version of after the endpoint URL is updated to conform to the standard convention.
-
inventory.deprecatedRetrieveInventoryAdjustmentDeprecated version of after the endpoint URL is updated to conform to the standard convention.
-
inventory.deprecatedRetrieveInventoryPhysicalCountDeprecated version of after the endpoint URL is updated to conform to the standard convention.
-
inventory.retrieveInventoryAdjustmentReturns the object with the provided
adjustment_id. -
inventory.retrieveInventoryChangesReturns a set of physical counts and inventory adjustments for the provided at the requested s.
You can achieve the same result by calling and having the
catalog_object_idslist contain a single element of theCatalogObjectID.Results are paginated and sorted in descending order according to their
occurred_attimestamp (newest first).There are no limits on how far back the caller can page. This endpoint can be used to display recent changes for a specific item. For more sophisticated queries, use a batch endpoint.
-
inventory.retrieveInventoryCountRetrieves the current calculated stock count for a given at a given set of s. Responses are paginated and unsorted. For more sophisticated queries, use a batch endpoint.
-
inventory.retrieveInventoryPhysicalCountReturns the object with the provided
physical_count_id. -
inventory.retrieveInventoryTransferReturns the object with the provided
transfer_id. -
invoices.cancelInvoiceCancels an invoice. The seller cannot collect payments for the canceled invoice.
You cannot cancel an invoice in the
DRAFTstate or in a terminal state:PAID,REFUNDED,CANCELED, orFAILED. -
invoices.createInvoiceCreates a draft for an order created using the Orders API.
A draft invoice remains in your account and no action is taken. You must publish the invoice before Square can process it (send it to the customer's email address or charge the customer’s card on file).
-
invoices.deleteInvoiceDeletes the specified invoice. When an invoice is deleted, the associated order status changes to CANCELED. You can only delete a draft invoice (you cannot delete a published invoice, including one that is scheduled for processing).
-
invoices.getInvoiceRetrieves an invoice by invoice ID.
-
invoices.listInvoicesReturns a list of invoices for a given location. The response is paginated. If truncated, the response includes a
cursorthat you
use in a subsequent request to retrieve the next set of invoices. -
invoices.publishInvoicePublishes the specified draft invoice.
After an invoice is published, Square follows up based on the invoice configuration. For example, Square sends the invoice to the customer's email address, charges the customer's card on file, or does nothing. Square also makes the invoice available on a Square-hosted invoice page.
The invoice
statusalso changes fromDRAFTto a status based on the invoice configuration. For example, the status changes toUNPAIDif Square emails the invoice orPARTIALLY_PAIDif Square charge a card on file for a portion of the invoice amount. -
invoices.searchInvoicesSearches for invoices from a location specified in the filter. You can optionally specify customers in the filter for whom to retrieve invoices. In the current implementation, you can only specify one location and optionally one customer.
The response is paginated. If truncated, the response includes a
cursorthat you use in a subsequent request to retrieve the next set of invoices. -
invoices.updateInvoiceUpdates an invoice by modifying fields, clearing fields, or both. For most updates, you can use a sparse
Invoiceobject to add fields or change values and use thefields_to_clearfield to specify fields to clear. However, some restrictions apply. For example, you cannot change theorder_idorlocation_idfield and you must provide the completecustom_fieldslist to update a custom field. Published invoices have additional restrictions. -
labor.createBreakTypeCreates a new
BreakType.A
BreakTypeis a template for creatingBreakobjects. You must provide the following values in your request to this endpoint:location_idbreak_nameexpected_durationis_paid
You can only have three
BreakTypeinstances per location. If you attempt to add a fourthBreakTypefor a location, anINVALID_REQUEST_ERROR"Exceeded limit of 3 breaks per location." is returned. -
labor.createShiftCreates a new
Shift.A
Shiftrepresents a complete workday for a single employee. You must provide the following values in your request to this endpoint:location_idemployee_idstart_at
An attempt to create a new
Shiftcan result in aBAD_REQUESTerror when:- The
statusof the newShiftisOPENand the employee has another shift with anOPENstatus. - The
start_atdate is in the future. - The
start_atorend_atdate overlaps another shift for the same employee. - The
Breakinstances are set in the request and a breakstart_atis before theShift.start_at, a breakend_atis after theShift.end_at, or both.
-
labor.deleteBreakTypeDeletes an existing
BreakType.A
BreakTypecan be deleted even if it is referenced from aShift. -
labor.deleteShiftDeletes a
Shift. -
labor.getBreakTypeReturns a single
BreakTypespecified byid. -
labor.getEmployeeWageReturns a single
EmployeeWagespecified byid. -
labor.getShiftReturns a single
Shiftspecified byid. -
labor.getTeamMemberWageReturns a single
TeamMemberWagespecified byid. -
labor.listBreakTypesReturns a paginated list of
BreakTypeinstances for a business. -
labor.listEmployeeWagesReturns a paginated list of
EmployeeWageinstances for a business. -
labor.listTeamMemberWagesReturns a paginated list of
TeamMemberWageinstances for a business. -
labor.listWorkweekConfigsReturns a list of
WorkweekConfiginstances for a business. -
labor.searchShiftsReturns a paginated list of
Shiftrecords for a business. The list to be returned can be filtered by:- Location IDs.
- Employee IDs.
- Shift status (
OPENandCLOSED). - Shift start.
- Shift end.
- Workday details.
The list can be sorted by:
start_at.end_at.created_at.updated_at.
-
labor.updateBreakTypeUpdates an existing
BreakType. -
labor.updateShiftUpdates an existing
Shift.When adding a
Breakto aShift, any earlierBreakinstances in theShifthave theend_atproperty set to a valid RFC-3339 datetime string.When closing a
Shift, allBreakinstances in theShiftmust be complete withend_atset on eachBreak. -
labor.updateWorkweekConfigUpdates a
WorkweekConfig. -
locations.createLocationCreates a location.
-
locations.listLocationsProvides information of all locations of a business.
Many Square API endpoints require a
location_idparameter. Theidfield of the objects returned by this endpoint correspond to thatlocation_idparameter. -
locations.retrieveLocationRetrieves details of a location. You can specify "main" as the location ID to retrieve details of the main location.
-
locations.updateLocationUpdates a location.
-
loyalty.accumulateLoyaltyPointsAdds points to a loyalty account.
- If you are using the Orders API to manage orders, you only provide the
order_id. The endpoint reads the order to compute points to add to the buyer's account. - If you are not using the Orders API to manage orders,
you first perform a client-side computation to compute the points.
For spend-based and visit-based programs, you can first call to compute the points
that you provide to this endpoint.
Note: The country of the seller's Square account determines whether tax is included in the purchase amount when accruing points for spend-based and visit-based programs. For more information, see .
- If you are using the Orders API to manage orders, you only provide the
-
loyalty.adjustLoyaltyPointsAdds points to or subtracts points from a buyer's account.
Use this endpoint only when you need to manually adjust points. Otherwise, in your application flow, you call to add points when a buyer pays for the purchase.
-
loyalty.calculateLoyaltyPointsCalculates the points a purchase earns.
- If you are using the Orders API to manage orders, you provide
order_idin the request. The endpoint calculates the points by reading the order. - If you are not using the Orders API to manage orders, you provide the purchase amount in the request for the endpoint to calculate the points.
An application might call this endpoint to show the points that a buyer can earn with the specific purchase.
Note: The country of the seller's Square account determines whether tax is included in the purchase amount when accruing points for spend-based and visit-based programs. For more information, see .
- If you are using the Orders API to manage orders, you provide
-
loyalty.createLoyaltyAccountCreates a loyalty account. To create a loyalty account, you must provide the
program_idand amappingwith thephone_numberof the buyer. -
loyalty.createLoyaltyRewardCreates a loyalty reward. In the process, the endpoint does following:
- Uses the
reward_tier_idin the request to determine the number of points to lock for this reward. - If the request includes
order_id, it adds the reward and related discount to the order.
After a reward is created, the points are locked and not available for the buyer to redeem another reward.
- Uses the
-
loyalty.deleteLoyaltyRewardDeletes a loyalty reward by doing the following:
- Returns the loyalty points back to the loyalty account.
- If an order ID was specified when the reward was created (see ), it updates the order by removing the reward and related discounts.
You cannot delete a reward that has reached the terminal state (REDEEMED).
-
loyalty.listLoyaltyProgramsReturns a list of loyalty programs in the seller's account. Loyalty programs define how buyers can earn points and redeem points for rewards. Square sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. For more information, see .
Replaced with when used with the keyword
main. -
loyalty.redeemLoyaltyRewardRedeems a loyalty reward.
The endpoint sets the reward to the
REDEEMEDterminal state.If you are using your own order processing system (not using the Orders API), you call this endpoint after the buyer paid for the purchase.
After the reward reaches the terminal state, it cannot be deleted. In other words, points used for the reward cannot be returned to the account.
-
loyalty.retrieveLoyaltyAccountRetrieves a loyalty account.
-
loyalty.retrieveLoyaltyProgramRetrieves the loyalty program in a seller's account, specified by the program ID or the keyword
main.Loyalty programs define how buyers can earn points and redeem points for rewards. Square sellers can have only one loyalty program, which is created and managed from the Seller Dashboard. For more information, see .
-
loyalty.retrieveLoyaltyRewardRetrieves a loyalty reward.
-
loyalty.searchLoyaltyAccountsSearches for loyalty accounts in a loyalty program.
You can search for a loyalty account using the phone number or customer ID associated with the account. To return all loyalty accounts, specify an empty
queryobject or omit it entirely.Search results are sorted by
created_atin ascending order. -
loyalty.searchLoyaltyEventsSearches for loyalty events.
A Square loyalty program maintains a ledger of events that occur during the lifetime of a buyer's loyalty account. Each change in the point balance (for example, points earned, points redeemed, and points expired) is recorded in the ledger. Using this endpoint, you can search the ledger for events.
Search results are sorted by
created_atin descending order. -
loyalty.searchLoyaltyRewardsSearches for loyalty rewards in a loyalty account.
In the current implementation, the endpoint supports search by the reward
status.If you know a reward ID, use the endpoint.
Search results are sorted by
updated_atin descending order. -
merchants.listMerchantsReturns
Merchantinformation for a given access token.If you don't know a
MerchantID, you can use this endpoint to retrieve the merchant ID for an access token. You can specify your personal access token to get your own merchant information or specify an OAuth token to get the information for the merchant that granted you access.If you know the merchant ID, you can also use the endpoint to get the merchant information.
-
merchants.retrieveMerchantRetrieve a
Merchantobject for the givenmerchant_id. -
mobileAuthorization.createMobileAuthorizationCodeGenerates code to authorize a mobile application to connect to a Square card reader
Authorization codes are one-time-use and expire 60 minutes after being issued.
Important: The
Authorizationheader you provide to this endpoint must have the following format:Replace
ACCESS_TOKENwith a . -
oAuth.obtainTokenReturns an OAuth access token.
The endpoint supports distinct methods of obtaining OAuth access tokens. Applications specify a method by adding the
grant_typeparameter in the request and also provide relevant information.Note: Regardless of the method application specified, the endpoint always returns two items; an OAuth access token and a refresh token in the response.
OAuth tokens should only live on secure servers. Application clients should never interact directly with OAuth tokens.
-
oAuth.renewTokenRenewTokenis deprecated. For information about refreshing OAuth access tokens, see .Renews an OAuth access token before it expires.
OAuth access tokens besides your application's personal access token expire after 30 days. You can also renew expired tokens within 15 days of their expiration. You cannot renew an access token that has been expired for more than 15 days. Instead, the associated user must re-complete the OAuth flow from the beginning.
Important: The
Authorizationheader for this endpoint must have the following format:Replace
APPLICATION_SECRETwith the application secret on the Credentials page in the . -
oAuth.revokeTokenRevokes an access token generated with the OAuth flow.
If an account has more than one OAuth access token for your application, this endpoint revokes all of them, regardless of which token you specify. When an OAuth access token is revoked, all of the active subscriptions associated with that OAuth token are canceled immediately.
Important: The
Authorizationheader for this endpoint must have the following format:Replace
APPLICATION_SECRETwith the application secret on the OAuth page in the . -
orders.batchRetrieveOrdersRetrieves a set of by their IDs.
If a given order ID does not exist, the ID is ignored instead of generating an error.
-
orders.calculateOrderEnables applications to preview order pricing without creating an order.
-
orders.createOrderCreates a new that can include information about products for purchase and settings to apply to the purchase.
To pay for a created order, see .
You can modify open orders using the endpoint.
-
orders.getV2OrdersOrderIdRetrieves an by ID.
-
orders.payOrderPay for an using one or more approved or settle an order with a total of
0.The total of the
payment_idslisted in the request must be equal to the order total. Orders with a total amount of0can be marked as paid by specifying an empty array ofpayment_idsin the request.To be used with
PayOrder, a payment must:- Reference the order by specifying the
order_idwhen . Any approved payments that reference the sameorder_idnot specified in thepayment_idsis canceled. - Be approved with .
Using a delayed capture payment with
PayOrdercompletes the approved payment.
- Reference the order by specifying the
-
orders.putV2OrdersOrderIdUpdates an open by adding, replacing, or deleting fields. Orders with a
COMPLETEDorCANCELEDstate cannot be updated.An
UpdateOrderrequest requires the following:- The
order_idin the endpoint path, identifying the order to update. - The latest
versionof the order to update. - The containing only the fields to update and the version to which the update is being applied.
- If deleting fields, the identifying the fields to clear.
To pay for an order, see .
- The
-
orders.searchOrdersSearch all orders for one or more locations. Orders include all sales, returns, and exchanges regardless of how or when they entered the Square ecosystem (such as Point of Sale, Invoices, and Connect APIs).
SearchOrdersrequests need to specify which locations to search and define a object that controls how to sort or filter the results. YourSearchOrdersQuerycan:Set filter criteria. Set the sort order. Determine whether to return results as complete
Orderobjects or as objects.Note that details for orders processed with Square Point of Sale while in offline mode might not be transmitted to Square for up to 72 hours. Offline orders have a
created_atvalue that reflects the time the order was created, not the time it was subsequently transmitted to Square. -
payments.cancelPaymentCancels (voids) a payment. You can use this endpoint to cancel a payment with the APPROVED
status. -
payments.cancelPaymentByIdempotencyKeyCancels (voids) a payment identified by the idempotency key that is specified in the request.
Use this method when the status of a
CreatePaymentrequest is unknown (for example, after you send aCreatePaymentrequest, a network error occurs and you do not get a response). In this case, you can direct Square to cancel the payment using this endpoint. In the request, you provide the same idempotency key that you provided in yourCreatePaymentrequest that you want to cancel. After canceling the payment, you can submit yourCreatePaymentrequest again.Note that if no payment with the specified idempotency key is found, no action is taken and the endpoint returns successfully.
-
payments.completePaymentCompletes (captures) a payment. By default, payments are set to complete immediately after they are created.
You can use this endpoint to complete a payment with the APPROVED
status. -
payments.createPaymentCreates a payment using the provided source. You can use this endpoint to charge a card (credit/debit card or
Square gift card) or record a payment that the seller received outside of Square (cash payment from a buyer or a payment that an external entity processed on behalf of the seller).The endpoint creates a
Paymentobject and returns it in the response. -
payments.getPaymentRetrieves details for a specific payment.
-
payments.getV2PaymentsRetrieves a list of payments taken by the account making the request.
Results are eventually consistent, and new payments or changes to payments might take several seconds to appear.
The maximum results per page is 100.
-
payments.updatePaymentUpdates a payment with the APPROVED status. You can update the
amount_moneyandtip_moneyusing this endpoint. -
refunds.getPaymentRefundRetrieves a specific refund using the
refund_id. -
refunds.listPaymentRefundsRetrieves a list of refunds for the account making the request.
Results are eventually consistent, and new refunds or changes to refunds might take several seconds to appear.
The maximum results per page is 100.
-
refunds.refundPaymentRefunds a payment. You can refund the entire payment amount or a portion of it. You can use this endpoint to refund a card payment or record a refund of a cash or external payment. For more information, see .
-
sites.listSitesLists the Square Online sites that belong to a seller.
Note: Square Online APIs are publicly available as part of an early access program. For more information, see .
-
snippets.deleteSnippetRemoves your snippet from a Square Online site.
You can call to get the IDs of the sites that belong to a seller.
Note: Square Online APIs are publicly available as part of an early access program. For more information, see .
-
snippets.retrieveSnippetRetrieves your snippet from a Square Online site. A site can contain snippets from multiple snippet applications, but you can retrieve only the snippet that was added by your application.
You can call to get the IDs of the sites that belong to a seller.
Note: Square Online APIs are publicly available as part of an early access program. For more information, see .
-
snippets.upsertSnippetAdds a snippet to a Square Online site or updates the existing snippet on the site. The snippet code is appended to the end of the
headelement on every page of the site, except checkout pages. A snippet application can add one snippet to a given site.You can call to get the IDs of the sites that belong to a seller.
Note: Square Online APIs are publicly available as part of an early access program. For more information, see .
-
subscriptions.cancelSubscriptionSets the
canceled_datefield to the end of the active billing period. After this date, the status changes from ACTIVE to CANCELED. -
subscriptions.createSubscriptionCreates a subscription for a customer to a subscription plan.
If you provide a card on file in the request, Square charges the card for the subscription. Otherwise, Square bills an invoice to the customer's email address. The subscription starts immediately, unless the request includes the optional
start_date. Each individual subscription is associated with a particular location. -
subscriptions.listSubscriptionEventsLists all events for a specific subscription. In the current implementation, only
START_SUBSCRIPTIONandSTOP_SUBSCRIPTION(when the subscription was canceled) events are returned. -
subscriptions.resumeSubscriptionResumes a deactivated subscription.
-
subscriptions.retrieveSubscriptionRetrieves a subscription.
-
subscriptions.searchSubscriptionsSearches for subscriptions. Results are ordered chronologically by subscription creation date. If the request specifies more than one location ID, the endpoint orders the result by location ID, and then by creation date within each location. If no locations are given in the query, all locations are searched.
You can also optionally specify
customer_idsto search by customer. If left unset, all customers associated with the specified locations are returned. If the request specifies customer IDs, the endpoint orders results first by location, within location by customer ID, and within customer by subscription creation date.For more information, see .
-
subscriptions.updateSubscriptionUpdates a subscription. You can set, modify, and clear the
subscriptionfield values. -
team.bulkCreateTeamMembersCreates multiple
TeamMemberobjects. The createdTeamMemberobjects are returned on successful creates. This process is non-transactional and processes as much of the request as possible. If one of the creates in the request cannot be successfully processed, the request is not marked as failed, but the body of the response contains explicit error information for the failed create.Learn about .
-
team.bulkUpdateTeamMembersUpdates multiple
TeamMemberobjects. The updatedTeamMemberobjects are returned on successful updates. This process is non-transactional and processes as much of the request as possible. If one of the updates in the request cannot be successfully processed, the request is not marked as failed, but the body of the response contains explicit error information for the failed update. Learn about . -
team.createTeamMemberCreates a single
TeamMemberobject. TheTeamMemberobject is returned on successful creates. You must provide the following values in your request to this endpoint:given_namefamily_name
Learn about .
-
team.retrieveTeamMemberRetrieves a
TeamMemberobject for the givenTeamMember.id. Learn about . -
team.retrieveWageSettingRetrieves a
WageSettingobject for a team member specified byTeamMember.id. Learn about . -
team.searchTeamMembersReturns a paginated list of
TeamMemberobjects for a business. The list can be filtered by the following:- location IDs
status
-
team.updateTeamMemberUpdates a single
TeamMemberobject. TheTeamMemberobject is returned on successful updates. Learn about . -
team.updateWageSettingCreates or updates a
WageSettingobject. The object is created if aWageSettingwith the specifiedteam_member_iddoes not exist. Otherwise, it fully replaces theWageSettingobject for the team member. TheWageSettingis returned on a successful update. Learn about . -
terminal.cancelTerminalCheckoutCancels a Terminal checkout request if the status of the request permits it.
-
terminal.cancelTerminalRefundCancels an Interac Terminal refund request by refund request ID if the status of the request permits it.
-
terminal.createTerminalCheckoutCreates a Terminal checkout request and sends it to the specified device to take a payment for the requested amount.
-
terminal.createTerminalRefundCreates a request to refund an Interac payment completed on a Square Terminal.
-
terminal.getTerminalCheckoutRetrieves a Terminal checkout request by
checkout_id. -
terminal.getTerminalRefundRetrieves an Interac Terminal refund object by ID.
-
terminal.searchTerminalCheckoutsRetrieves a filtered list of Terminal checkout requests created by the account making the request.
-
terminal.searchTerminalRefundsRetrieves a filtered list of Interac Terminal refund requests created by the seller making the request.
-
transactions.captureTransactionCaptures a transaction that was created with the endpoint with a
delay_capturevalue oftrue.See for more information.
-
transactions.chargeCharges a card represented by a card nonce or a customer's card on file.
Your request to this endpoint must include either:
- A value for the
card_nonceparameter (to charge a card payment token generated with the Web Payments SDK) - Values for the
customer_card_idandcustomer_idparameters (to charge a customer's card on file)
In order for an eCommerce payment to potentially qualify for , you must provide values for the following parameters in your request:
buyer_email_address- At least one of
billing_addressorshipping_address
When this response is returned, the amount of Square's processing fee might not yet be calculated. To obtain the processing fee, wait about ten seconds and call . See the
processing_fee_moneyfield of each in the transaction. - A value for the
-
transactions.getV2LocationsLocationIdRefundsLists refunds for one of a business's locations.
In addition to full or partial tender refunds processed through Square APIs, refunds may result from itemized returns or exchanges through Square's Point of Sale applications.
Refunds with a
statusofPENDINGare not currently included in this endpoint's response.Max results per : 50
-
transactions.listTransactionsLists transactions for a particular location.
Transactions include payment information from sales and exchanges and refund information from returns and exchanges.
Max results per : 50
-
transactions.postV2LocationsLocationIdTransactionsTransactionIdRefundInitiates a refund for a previously charged tender.
You must issue a refund within 120 days of the associated payment. See for more information on refund behavior.
NOTE: Card-present transactions with Interac credit cards cannot be refunded using the Connect API. Interac transactions must refunded in-person (e.g., dipping the card using POS app).
-
transactions.retrieveTransactionRetrieves details for a single transaction.
-
transactions.voidTransactionCancels a transaction that was created with the endpoint with a
delay_capturevalue oftrue.See for more information.
-
v1Employees.createEmployeeUse the CreateEmployee endpoint to add an employee to a Square account. Employees created with the Connect API have an initial status of
INACTIVE. Inactive employees cannot sign in to Square Point of Sale until they are activated from the Square Dashboard. Employee status cannot be changed with the Connect API.Employee entities cannot be deleted. To disable employee profiles, set the employee's status to
INACTIVE -
v1Employees.createEmployeeRoleCreates an employee role you can then assign to employees.
Square accounts can include any number of roles that can be assigned to employees. These roles define the actions and permissions granted to an employee with that role. For example, an employee with a "Shift Manager" role might be able to issue refunds in Square Point of Sale, whereas an employee with a "Clerk" role might not.
Roles are assigned with the endpoint. An employee can have only one role at a time.
If an employee has no role, they have none of the permissions associated with roles. All employees can accept payments with Square Point of Sale.
-
v1Employees.listEmployeeRolesProvides summary information for all of a business's employee roles.
-
v1Employees.listEmployeesProvides summary information for all of a business's employees.
-
v1Employees.retrieveEmployeeProvides the details for a single employee.
-
v1Employees.retrieveEmployeeRoleProvides the details for a single employee role.
-
v1Employees.updateEmployee -
v1Employees.updateEmployeeRoleModifies the details of an employee role.
-
v1Transactions.createRefundIssues a refund for a previously processed payment. You must issue a refund within 60 days of the associated payment.
You cannot issue a partial refund for a split tender payment. You must instead issue a full or partial refund for a particular tender, by providing the applicable tender id to the V1CreateRefund endpoint. Issuing a full refund for a split tender payment refunds all tenders associated with the payment.
Issuing a refund for a card payment is not reversible. For development purposes, you can create fake cash payments in Square Point of Sale and refund them.
-
v1Transactions.listOrdersProvides summary information for a merchant's online store orders.
-
v1Transactions.listPaymentsProvides summary information for all payments taken for a given Square account during a date range. Date ranges cannot exceed 1 year in length. See Date ranges for details of inclusive and exclusive dates.
Note*: Details for payments processed with Square Point of Sale while in offline mode may not be transmitted to Square for up to 72 hours. Offline payments have a
created_atvalue that reflects the time the payment was originally processed, not the time it was subsequently transmitted to Square. Consequently, the ListPayments endpoint might list an offline payment chronologically between online payments that were seen in a previous request.*** -
v1Transactions.listRefundsProvides the details for all refunds initiated by a merchant or any of the merchant's mobile staff during a date range. Date ranges cannot exceed one year in length.
-
v1Transactions.listSettlementsProvides summary information for all deposits and withdrawals initiated by Square to a linked bank account during a date range. Date ranges cannot exceed one year in length.
Note*: the ListSettlements endpoint does not provide entry information.***
-
v1Transactions.retrieveOrderProvides comprehensive information for a single online store order, including the order's history.
-
v1Transactions.retrievePaymentProvides comprehensive information for a single payment.
-
v1Transactions.retrieveSettlementProvides comprehensive information for a single settlement.
The returned
Settlementobjects include anentriesfield that lists the transactions that contribute to the settlement total. Most settlement entries correspond to a payment payout, but settlement entries are also generated for less common events, like refunds, manual adjustments, or chargeback holds.Square initiates its regular deposits as indicated in the help article. Details for a regular deposit are usually not available from Connect API endpoints before 10 p.m. PST the same day.
Square does not know when an initiated settlement completes, only whether it has failed. A completed settlement is typically reflected in a bank account within 3 business days, but in exceptional cases it may take longer.
-
v1Transactions.updateOrderUpdates the details of an online store order. Every update you perform on an order corresponds to one of three actions:
-
openapi.previewSpecPreview an OpenAPI document before adding it as a source
-
openapi.addSourceAdd an OpenAPI source and register its operations as tools