question

rvaliouline avatar image
rvaliouline asked jim-patel answered

Best webhook for completed order of an item

Hi,

What's the best webhook to use for detecting when a particular item has been sold? Is my only option to check every incoming Order update with state="locked" for that item?

Thanks in advance for any help

OrdersWebhooks
10 |2000

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

1 Answer

jim-patel avatar image
jim-patel answered

Just looking for state=locked is not sufficient, because an order can be locked without any payment being applied.

What I do, is make sure the order has been fully paid by adding up all of the payments and comparing that to the total of the order, then checking the order for the item. And yes, I do this for every order.

10 |2000

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