Skip to content

Square: Create Terminal Checkout

Square terminal.createTerminalCheckout: arguments, response, policy and SDK examples.

← Terminal operations · Get started

Operation square.createterminalcheckout

Provider route: POST /v2/terminals/checkouts. Alter supplies the connection’s credentials and routing.

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"]["createTerminalCheckout"]>[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.createTerminalCheckout(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from 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.create_terminal_checkout(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyModelRequired within parentExpand Create Terminal Checkout — request body — body

Referenced models: Create Terminal Checkout — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Create Terminal Checkout — response body

Referenced models: Create Terminal Checkout — response body

12 more schemas are linked from the tables above, on the schema pages.

Create Terminal Checkout — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
checkoutModelRequired within parentExpand Create Terminal Checkout — request body — body checkout
The checkout to create.
idempotency_keystringRequired within parentA unique string that identifies this `CreateCheckout` request. Keys can be any valid string but
must be unique for every `CreateCheckout` request.

See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information.
Maximum length: 64
Minimum length: 1

Referenced models: Create Terminal Checkout — request body — body checkout

Create Terminal Checkout — response body
FieldTypePresenceDescription and constraints
$objectRoot
checkoutModelOptionalExpand Get Terminal Checkout — response body — checkout
The created `TerminalCheckout`.
errorsarrayOptionalInformation about errors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Get Shift — response body — errors item, Get Terminal Checkout — response body — checkout

Create Terminal Checkout — request body — body checkout
FieldTypePresenceDescription and constraints
$objectRootRepresents a checkout processed by the Square Terminal.
amount_moneyModelRequired within parentExpand Create Payment — request body — body tip money
The amount of money (including the tax amount) that the Square Terminal device should try to collect.
app_fee_moneyJSONOptional
app_fee_money (anyOf 1)ModelAlternativeExpand Create Payment — request body — body tip 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)nullAlternative
app_idstringOptionalThe ID of the application that created the checkout.
Read only: true
cancel_reasonstringOptionalThe reason why `TerminalCheckout` is canceled. Present if the status is `CANCELED`.
See [ActionCancelReason](#type-actioncancelreason) for possible values
One of: BUYER_CANCELED, SELLER_CANCELED, TIMED_OUT
Read only: true
created_atstringOptionalThe time when the `TerminalCheckout` was created, as an RFC 3339 timestamp.
Read only: true
customer_idJSONOptional
customer_id (anyOf 1)stringAlternativeAn optional ID of the customer associated with the checkout.
customer_id (anyOf 2)nullAlternative
deadline_durationJSONOptional
deadline_duration (anyOf 1)stringAlternativeAn 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)nullAlternative
device_optionsModelRequired within parentExpand Create Terminal Checkout — request body — body checkout device options
Options to control the display and behavior of the Square Terminal device.
idstringOptionalA unique ID for this `TerminalCheckout`.
Maximum length: 255
Minimum length: 10
Read only: true
location_idstringOptionalThe location of the device where the `TerminalCheckout` was directed.
Maximum length: 64
Read only: true
noteJSONOptional
note (anyOf 1)stringAlternativeAn 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)nullAlternative
order_idJSONOptional
order_id (anyOf 1)stringAlternativeThe reference to the Square order ID for the checkout request.
order_id (anyOf 2)nullAlternative
payment_idsarrayOptionalA list of IDs for payments created by this `TerminalCheckout`.
Read only: true
payment_ids[]stringEach item
payment_optionsJSONOptional
payment_options (anyOf 1)ModelAlternativeExpand Create Terminal Checkout — request body — body checkout payment options accept partial authorization, autocomplete, delay action, delay duration
Payment-specific options for the checkout request.
payment_options (anyOf 2)nullAlternative
payment_typeJSONOptional
payment_type (anyOf 1)stringAlternativeThe type of payment the terminal should attempt to capture from. Defaults to `CARD_PRESENT`.
See [CheckoutOptionsPaymentType](#type-checkoutoptionspaymenttype) for possible values
One of: CARD_PRESENT, MANUAL_CARD_ENTRY, FELICA_ID, FELICA_QUICPAY, FELICA_TRANSPORTATION_GROUP, FELICA_ALL, PAYPAY, QR_CODE
payment_type (anyOf 2)nullAlternative
reference_idJSONOptional
reference_id (anyOf 1)stringAlternativeAn 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)nullAlternative
statement_description_identifierJSONOptional
statement_description_identifier (anyOf 1)stringAlternativeOptional 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)nullAlternative
statusstringOptionalThe status of the `TerminalCheckout`.
Options: `PENDING`, `IN_PROGRESS`, `CANCEL_REQUESTED`, `CANCELED`, `COMPLETED`
Read only: true
team_member_idJSONOptional
team_member_id (anyOf 1)stringAlternativeAn optional ID of the team member associated with creating the checkout.
team_member_id (anyOf 2)nullAlternative
tip_moneyJSONOptional
tip_money (anyOf 1)ModelAlternativeExpand Create Payment — request body — body tip 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)nullAlternative
updated_atstringOptionalThe time when the `TerminalCheckout` was last updated, as an RFC 3339 timestamp.
Read only: true

Referenced models: Create Terminal Checkout — request body — body checkout device options, Create Payment — request body — body tip money, Create Terminal Checkout — request body — body checkout payment options accept partial authorization, autocomplete, delay action, delay duration

Get Shift — response body — errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents 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.
categorystringRequired within parentIndicates 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
codeModelRequired within parentExpand Get Shift — response body — errors item code
The specific code of the error.
See [ErrorCode](#type-errorcode) for possible values
detailstringOptionalA human-readable description of the error for debugging purposes.
fieldstringOptionalThe 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

SDK function policy ID: square.createterminalcheckout. Catalog operation: CreateTerminalCheckout. 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_WRITE"]

Pinned headers: {"Square-Version": "2026-11-18"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.