question

brokenoval avatar image
brokenoval asked ·

How can I tell if an order is Paid vs Partially Paid vs Open?

Using the /orders API I can pull almost any details about an order, however I can't find a way to easily tell what payment "state" an order is in.

The line item for "state" seems to only ever be "open" or "locked" and as per the documentation is not to be used for any logical decision making: https://www.clover.com/api_docs#!/ord...

The "payType" tells me whether an order is likely to be partially paid i.e. it will be "Split_", however there seems to be no difference between a Partially Paid and a Fully Paid split payment.

What is the recommended way to determining whether an Order is fully closed?

Thanks!

Orders
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered ·

Order "state" as you are referring to it is a mushy concept. You can't rely on the server to tell you such things, because there server is only a data store. For example, a client could set the state of an order to OPEN, when it has payments amounting to the order total. That is allowed.

You need to do your own calculations. There's an answer in this thread: https://devask.clover.com/question/41... that tells you how to do that.

Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community