Applies to: Terminal API
Learn how to customize buyer workflows, save cards on file, check a device status, and perform other tasks.
The Terminal API provides additional ways for a Square Terminal and a Point of Sale (POS) application to interact. These interactions are called Terminal actions.
Important
Terminal actions are in Beta.
Create a Terminal action request
After pairing a Square Terminal using the Devices API, you can create a new CreateTerminalAction request, which is similar to requesting a checkout or refund. The POS application sends a request to Square using the Terminal API. The action request goes to Square, which forwards it to the paired Square Terminal. The request carries the action and prompts the buyer with a screen based on the action type.
When the buyer completes the action on the Square Terminal, the POS application can be notified by a Square webhook or get the action result using the Terminal API.
The following example shows a POST request to create a new Terminal action for saving a card on file:
Search for a Terminal action request
You can retrieve a filtered list of Terminal action requests created by an account by sending a POST request to the SearchTerminalActions endpoint. Terminal action requests are available for 30 days.
The following example shows a request to search for a Terminal action with the device status of PENDING
:
Cancel a Terminal action request
You can send a POST request to cancel a Terminal action if the status of the request permits it or if the request is pending or in progress.
The following example shows a POST request to cancel a Terminal action that takes an action_id
in the path parameter:
Types of Terminal actions
The Terminal API allows you to create the following Terminal actions:
Customize the Square Terminal idle screen
In addition to Terminal actions, the Terminal API allows sellers to customize the Square Terminal idle screen and showcase their business and brand. For more information, see Customize the Square Terminal Idle Screen.