question

rvaliouline avatar image
rvaliouline asked ·

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 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

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.

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