The lifecycle of an order in Square involves several stages. When an order is first created, it is in an ‘OPEN’ state. This means that the order has been initiated, but not yet paid for or fulfilled.
When you create a Payment object with the ‘EXTERNAL’ type and associate it with the Order ID, you are essentially marking that order as paid. However, this does not automatically change the state of the order to ‘COMPLETED’.
To change the state of an order to ‘COMPLETED’, you need to use the UpdateOrder endpoint of the Orders API. However, it’s important to note that only orders created via the API can be updated to ‘COMPLETED’ state using the API. If the order was created through the Square Point of Sale application or another non-API method, it cannot be updated to ‘COMPLETED’ via the API.
As for providing a visual confirmation to the cashier, the Square Point of Sale application will show the status of the order, including whether it has been paid. If the order was paid using an ‘EXTERNAL’ payment, this should be reflected in the order’s details. However, the specific details of how this information is displayed may vary depending on the version and configuration of the Point of Sale application.
In summary, to ensure that an order is marked as completed after payment, you should create the order via the API, create a Payment object with type ‘EXTERNAL’ and associate it with the order, and then update the order’s state to ‘COMPLETED’ using the UpdateOrder endpoint.
This answer was reviewed by @Bryan-Square.