We are creating a front end app that will be used to place orders. The app will not handle payments, this will be done thru clover app. While looking at the order fields in Clover Developer APIs doc, I see there are 2 fields paymentState and state. Looks like paymentState can take the values of OPEN, PAID, REFUNDED, CREDITED, PARTIALLY-PAID & PARTIALLY-REFUNDED. The ‘state’ field can have the values null, open, locked but are not strictly enforced.
So my question is, when we create a new order with lineItems added to it, what should be the value for paymentState and state fields? I am thinking it would have to be ‘OPEN’ and ‘open’ respectively. Am I right? I tried to update the paymentState field while creating the order but the value is not getting stored, it shows as null. Is this as expected?
When payment is made, how do the paymentState and state values change? Do they both change? We are planning on using an existing order if its not completely paid to add new lineItems. So I am wondering if can check the order’s paymentState != PAID to use the order or do I need to consider anything else.