Skip to content

square-terminal

Use when working with Square Terminal API for in-person payments, device pairing, terminal checkout flows, or POS application integration. Also use when setting up Square Terminal hardware or debugging device connectivity.

ModelSource
sonnetpack: payments
Full Reference

┏━ πŸ”§ square-terminal ━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when working with Square Terminal API for … ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Connects POS applications to Square Terminal hardware for in-person payments via Square’s servers. No direct POS-to-hardware connection.

API VersionBase URLNode SDKPython SDK
2026-01-22https://connect.squareup.com/v2npm install square (v40+)pip install squareup (v42+)
TopicFile
SDK setup, auth, OAuth permissions, architecturereference/authentication.md
Device pairing, device codes, hardware supportreference/device-pairing.md
Terminal checkout β€” create, cancel, search, tipsreference/terminal-checkout.md
Terminal Actions (PING, SAVE_CARD, etc.)reference/terminal-actions.md
Webhook handler, events, signature verificationreference/webhooks.md
Card surcharge (app_fee_money)reference/card-surcharge.md
Error codes, connectivity troubleshootingreference/error-handling.md
Sandbox setup, simulator, retired APIsreference/testing.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.

MistakeFix
Using Dashboard device code instead of API device codeOnly use device_id from CreateDeviceCode response
Trusting checkout amount as finalAlways verify against the Payment object β€” tips change the total
Trying to cancel a COMPLETED checkoutOnly PENDING and IN_PROGRESS can be canceled
Cash payments via Terminal APITerminal API doesn’t support cash β€” use Payments API
Using legacy SquareConnect packageUse square package v40+ with SquareClient
Device code not used within 5 minutesCode expires β€” create a new one
Skipping webhook signature verificationAlways verify X-Square-Hmacsha256-Signature
Not reading Payment object after COMPLETEDCheckout amount excludes tip; Payment object has the real total