Square: Search Terminal Checkouts
Square terminal.searchTerminalCheckouts: arguments, response, policy and SDK examples.
← Terminal operations · Get started
Operation square.searchterminalcheckouts
Provider route: POST /v2/terminals/checkouts/search. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/square with npm, or alter-sdk-square with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { SquareIntegration } from "@alter-ai/square";
async function execute(input: Parameters<SquareIntegration["terminal"]["searchTerminalCheckouts"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new SquareIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.terminal.searchTerminalCheckouts(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_square import SquareIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = SquareIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.terminal.search_terminal_checkouts(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Search Terminal Checkouts — request body — body |
Referenced models: Search Terminal Checkouts — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Search Terminal Checkouts — response body |
Referenced models: Search Terminal Checkouts — response body
Schemas
Section titled “Schemas”10 more schemas are linked from the tables above, on the schema pages.
Search Terminal Checkouts — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
checkouts | array | Optional | The requested search result of `TerminalCheckout` objects. |
checkouts[] | Model | Each item | Expand Get Terminal Checkout — response body — checkout |
cursor | string | Optional | The pagination cursor to be used in a subsequent request. If empty, this is the final response. See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information. |
errors | array | Optional | Information about errors encountered during the request. |
errors[] | Model | Each item | Expand Get Shift — response body — errors item |
Referenced models: Get Shift — response body — errors item, Get Terminal Checkout — response body — checkout
Search Terminal Checkouts — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
cursor | string | Optional | A pagination cursor returned by a previous call to this endpoint. Provide this cursor to retrieve the next set of results for the original query. See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information. |
limit | integer | Optional | Limits the number of results returned for a single request. Maximum: 100 Minimum: 1 |
query | Model | Optional | Expand Search Terminal Checkouts — request body — body query Queries Terminal checkouts based on given conditions and the sort order. Leaving these unset returns all checkouts with the default sort order. |
Referenced models: Search Terminal Checkouts — request body — body query
Get Shift — response body — errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an error encountered during a request to the Connect API. See [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information. |
category | string | Required within parent | Indicates which high-level category of error has occurred during a request to the Connect API. The high-level category for the error. See [ErrorCategory](#type-errorcategory) for possible values Known values: API_ERROR, AUTHENTICATION_ERROR, INVALID_REQUEST_ERROR, RATE_LIMIT_ERROR, PAYMENT_METHOD_ERROR, REFUND_ERROR, MERCHANT_SUBSCRIPTION_ERROR, EXTERNAL_VENDOR_ERROR |
code | Model | Required within parent | Expand Get Shift — response body — errors item code The specific code of the error. See [ErrorCode](#type-errorcode) for possible values |
detail | string | Optional | A human-readable description of the error for debugging purposes. |
field | string | Optional | The name of the field provided in the original request (if any) that the error pertains to. |
Referenced models: Get Shift — response body — errors item code
Get Terminal Checkout — response body — checkout
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a checkout processed by the Square Terminal. |
amount_money | Model | Required within parent | Expand Pay Order — response body — order total money The amount of money (including the tax amount) that the Square Terminal device should try to collect. |
app_fee_money | JSON | Optional | |
app_fee_money (anyOf 1) | Model | Alternative | Expand Pay Order — response body — order total money The amount the developer is taking as a fee for facilitating the payment on behalf of the seller. The amount cannot be more than 90% of the total amount of the payment. The amount must be specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see [Working with Monetary Amounts](https://developer.squareup.com/docs/build-basics/working-with-monetary-amounts). The fee currency code must match the currency associated with the seller that is accepting the payment. The application must be from a developer account in the same country and using the same currency code as the seller. For more information about the application fee scenario, see [Take Payments and Collect Fees](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees). To set this field, PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS OAuth permission is required. For more information, see [Permissions](https://developer.squareup.com/docs/payments-api/take-payments-and-collect-fees#permissions). |
app_fee_money (anyOf 2) | null | Alternative | |
app_id | string | Optional | The ID of the application that created the checkout. Read only: true |
cancel_reason | string | Optional | The reason why `TerminalCheckout` is canceled. Present if the status is `CANCELED`. See [ActionCancelReason](#type-actioncancelreason) for possible values Known values: BUYER_CANCELED, SELLER_CANCELED, TIMED_OUT Read only: true |
created_at | string | Optional | The time when the `TerminalCheckout` was created, as an RFC 3339 timestamp. Read only: true |
customer_id | JSON | Optional | |
customer_id (anyOf 1) | string | Alternative | An optional ID of the customer associated with the checkout. |
customer_id (anyOf 2) | null | Alternative | |
deadline_duration | JSON | Optional | |
deadline_duration (anyOf 1) | string | Alternative | An RFC 3339 duration, after which the checkout is automatically canceled. A `TerminalCheckout` that is `PENDING` is automatically `CANCELED` and has a cancellation reason of `TIMED_OUT`. Default: 5 minutes from creation Maximum: 5 minutes |
deadline_duration (anyOf 2) | null | Alternative | |
device_options | Model | Required within parent | Expand Get Terminal Checkout — response body — checkout device options Options to control the display and behavior of the Square Terminal device. |
id | string | Optional | A unique ID for this `TerminalCheckout`. Maximum length: 255 Minimum length: 10 Read only: true |
location_id | string | Optional | The location of the device where the `TerminalCheckout` was directed. Maximum length: 64 Read only: true |
note | JSON | Optional | |
note (anyOf 1) | string | Alternative | An optional note to associate with the checkout, as well as with any payments used to complete the checkout. Note: maximum 500 characters Maximum length: 500 |
note (anyOf 2) | null | Alternative | |
order_id | JSON | Optional | |
order_id (anyOf 1) | string | Alternative | The reference to the Square order ID for the checkout request. |
order_id (anyOf 2) | null | Alternative | |
payment_ids | array | Optional | A list of IDs for payments created by this `TerminalCheckout`. Read only: true |
payment_ids[] | string | Each item | |
payment_options | JSON | Optional | |
payment_options (anyOf 1) | Model | Alternative | Expand Get Terminal Checkout — response body — checkout payment options accept partial authorization, autocomplete, delay action, delay duration Payment-specific options for the checkout request. |
payment_options (anyOf 2) | null | Alternative | |
payment_type | JSON | Optional | |
payment_type (anyOf 1) | string | Alternative | The type of payment the terminal should attempt to capture from. Defaults to `CARD_PRESENT`. See [CheckoutOptionsPaymentType](#type-checkoutoptionspaymenttype) for possible values Known values: CARD_PRESENT, MANUAL_CARD_ENTRY, FELICA_ID, FELICA_QUICPAY, FELICA_TRANSPORTATION_GROUP, FELICA_ALL, PAYPAY, QR_CODE |
payment_type (anyOf 2) | null | Alternative | |
reference_id | JSON | Optional | |
reference_id (anyOf 1) | string | Alternative | An optional user-defined reference ID that can be used to associate this `TerminalCheckout` to another entity in an external system. For example, an order ID generated by a third-party shopping cart. The ID is also associated with any payments used to complete the checkout. Maximum length: 40 |
reference_id (anyOf 2) | null | Alternative | |
statement_description_identifier | JSON | Optional | |
statement_description_identifier (anyOf 1) | string | Alternative | Optional additional payment information to include on the customer's card statement as part of the statement description. This can be, for example, an invoice number, ticket number, or short description that uniquely identifies the purchase. Maximum length: 20 |
statement_description_identifier (anyOf 2) | null | Alternative | |
status | string | Optional | The status of the `TerminalCheckout`. Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED` Read only: true |
team_member_id | JSON | Optional | |
team_member_id (anyOf 1) | string | Alternative | An optional ID of the team member associated with creating the checkout. |
team_member_id (anyOf 2) | null | Alternative | |
tip_money | JSON | Optional | |
tip_money (anyOf 1) | Model | Alternative | Expand Pay Order — response body — order total money The amount designated as a tip, in addition to `amount_money`. This may only be set for a checkout that has tipping disabled (`tip_settings.allow_tipping` is `false`). |
tip_money (anyOf 2) | null | Alternative | |
updated_at | string | Optional | The time when the `TerminalCheckout` was last updated, as an RFC 3339 timestamp. Read only: true |
Referenced models: Get Terminal Checkout — response body — checkout device options, Pay Order — response body — order total money, Get Terminal Checkout — response body — checkout payment options accept partial authorization, autocomplete, delay action, delay duration
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: square.searchterminalcheckouts. Catalog operation: SearchTerminalCheckouts. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["PAYMENTS_READ"]
Pinned headers: {"Square-Version": "2026-11-18"}