My wife has a retail store where she uses a Clover PoS system, and I am doing some order integration work for her.
We have recently found that some of the sales associates are creating an order simply to scan a barcode (a price check). These orders are abandoned, but they continue to show up in the orders list (GET https://api.clover.com/v3/merchants/<... ).
As part of the integration I'm writing, I need to decrement inventory in an online store (3dCart) for items sold in the physical store (Clover). For the past week, I have not been properly filtering these "OPEN" orders, resulting in a skewed inventory since the items were not sold, but were decremented from the online inventory.
I began looking at the state field in the order response, but the API documentation says:
state
string
OPTIONAL
A String generally describing the state of this Order. The value null indicates an empty Order that is not displayed in user interfaces. Other value such as "open" and "locked" are not checked or enforced by client or server and thus are not useful for making any logical decisions about this Order.
I've found that in my case, there are no "null" orders. The "PAID" orders show "locked" and the "OPEN" orders show "open".
Am I incorrect in using this field to detect unpaid orders?