question

richa avatar image
richa asked David Marginian Deactivated answered

not receiving webhook related to payment update

2021-08-25-09-03-23.png2021-08-25-09-18-23.pngHi,

we have setup a webhook for payment.While testing we have found that we are not receiving webhook for payment update.We are just getting webhook for payment create.I am attaching screenshot for following orders for which I have received webhook for Create payment but not received .for update payment.We have permission for Payment read and in webhook we have permission for getting webhook for create,update and delete.Can you please check why I havent received it ?

PaymentsWebhooks
10 |2000

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

David Marginian avatar image
David Marginian Deactivated answered

Ok, thanks for clarifying that. So, you could use the API I mentioned above:

 /orders?expand=lineItems.item.itemStock

with an in filter on ids - https://docs.clover.com/docs/using-filters-to-retrieve-multiple-results-from-an-endpoint..

You could queue order ids and then make this call once a minute or more/less for each merchant which should drastically reduce the rate limiting issue you are concerned about.

You can't rely on the payments webhook (without additional queries) for this purpose. Three isues:

1) I am not sure if the hook fires for unsuccessful payments.

2) Partial payments.

3) I am not quite sure how you are associating the payment to order/inventory.

1 comment
10 |2000

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

fms avatar image fms commented ·
This is very helpful.

Thank you, David, for all the details, we will make the necessary changes, test the app, and will contact you if any further information is needed.


Thank you for your exceptional support as always.


Have a nice day ahead.

0 Likes 0 ·
David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated converted comment to answer

What is the update action on the payment that you are missing?

13 comments
10 |2000

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

fms avatar image fms commented ·
We are trying to get the confirmation on the orders for inventory sync with our system.

So when orders are placed in Clover, we are using Payment webhooks to get the confirmation about the payment has been made on that order and now we can sync the inventory.

Our main goal for this is to sync the inventory accurately by using the orders and then its payments for confirmation.

The reason we have signed up for Payment webhooks is: When there are open orders created in the clover (the payment has not been made yet for those), then still we are getting those orders webhooks and our Inventory sync module syncs the inventory and thats wrong.

We only want to sync the inventory for the orders for which the payments has been made or it is given to the customers.

0 Likes 0 ·
fms avatar image fms fms commented ·
Hello David,

Can you please provide any updates on this?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ fms commented ·

Per your original question:

"We are just getting webhook for payment create."

That seems to be all you need, and you have not clarified what is being updated on the order and why you need an update event.

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community