Reliable way to determine if order is POS

My app looks at orders (by polling by date or via a webhook) and needs to determine whether the order was made through POS or online. order.source does not seem to be set in many circumstances. How do I determine if this was a POS order?

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Build on Mobile Web
Use the Point of Sale API in Offline Mode
Orders API

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

To determine if an order was made through the Square Point of Sale (POS) application, you can look at the Order.source field. However, as you’ve noted, this field might not always be set. In such cases, you can use the Payment.application_details.square_product field associated with the order’s payment. If this field is set to SQUARE_POS, it indicates that the order was created through the Square POS application.

Additionally, you can check the Order.fulfillments field. Orders created through Square POS might have fulfillment details that are specific to in-person transactions, such as pickup or delivery options that are typically associated with POS orders.

If these fields are not sufficient, you might need to rely on other contextual information or business logic specific to your application to infer the source of the order.

This answer was reviewed by @Bryan-Square.

Hello,

How can I reliably determine whether an order was placed through POS or online when is not consistently populated?

Best Regard,
Garry mygreatlakes

You can use the Payment.application_details.square_product field associated with the payment from the Payments API to determine where a payment was take. :slight_smile: