question

anayooleru avatar image
anayooleru asked anayooleru answered

webhook is triggered when I create inventory, but when I create new order or edit order, no Webhook is triggered.

I have checked the READ and WRITE for all the Requested Permissions. Is the webhook only triggered for inventory alone?

Webhooks
10 |2000

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

bryanvargas avatar image
bryanvargas answered

We have webhooks for orders: https://docs.clover.com/docs/webhooks#event-type-keys


I would recommend rechecking your webhooks services and permissions. If you have recently changed your permissions you will have to generate a new OAuth token from your merchant so the permissions are synced.

10 |2000

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

anayooleru avatar image
anayooleru answered bryanvargas commented

I just rechecked my webhook and permissions. And I generated a new OAuth, checking every permission. Refreshed, and updated my API bearer with the token. And made several calls. But it's still the same. Only inventory triggers the webhook.

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.

bryanvargas avatar image bryanvargas ♦♦ commented ·
can you send a secure message of your developer ID and app ID
0 Likes 0 ·
parquet76 avatar image
parquet76 answered anayooleru commented

It sounds like you have not registered for the orders web hooks.

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.

anayooleru avatar image anayooleru commented ·

How do you mean? And how can the order webhooks be registered?

0 Likes 0 ·
anayooleru avatar image
anayooleru answered parquet76 commented

If you mean the Event Subscription when setting up the URL where webhook events will be sent, I had done that. In fact, I checked all the events.

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

parquet76 avatar image parquet76 commented ·

If you updated your app's permissions after you initially installed it you need to uninstall/reinstall it and then generate a new oauth token, see https://docs.clover.com/docs/401-unauthorized.

1 Like 1 ·
anayooleru avatar image anayooleru parquet76 commented ·
The app is still in draft mode, not yet in production. Okay, I am going to create a new test app and set the permissions on it right from the start and see what happens.
0 Likes 0 ·
parquet76 avatar image parquet76 anayooleru commented ·

Doesn't matter, the permissions on apps are set at the time of install. So if you changed them after the install the changes won't be reflected even if you obtain a new token.

0 Likes 0 ·
Show more comments
anayooleru avatar image
anayooleru answered parquet76 edited
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.

parquet76 avatar image parquet76 commented ·

Doesn't help unless we have context on when the permissions were in that state.

0 Likes 0 ·
anayooleru avatar image
anayooleru answered anayooleru commented

I created a new app, I verified the web-hook, and set the permissions. But the web-hook is not triggered at all. Please what is going on. Your documentation isn't clear, and now your sandbox isn't working correctly.

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

parquet76 avatar image parquet76 commented ·

If you set your apps permissions correctly, register for the webhooks you are interested in, properly install the app (https://docs.clover.com/docs/installing-your-app-to-your-test-merchant), and are creating/editing orders for the correct merchant (the merchant you installed the app to) you will receive webhooks.

0 Likes 0 ·
anayooleru avatar image anayooleru parquet76 commented ·
Please specify in your developer documentation that anyone updating permissions after app has been installed, should uninstall the app and reinstall it. Else nothing happens.
0 Likes 0 ·
parquet76 avatar image parquet76 anayooleru commented ·

@AnayoOleru it is documented in a few places, one example - https://docs.clover.com/docs/permissions.

"If you change app permissions after a merchant (including your test merchant) downloads your app, the new permissions don't take effect until the merchant uninstalls and reinstalls the app."

Another example:

https://docs.clover.com/docs/401-unauthorized#check-your-apps-permissions


1 Like 1 ·
Show more comments
shamsmalik avatar image
shamsmalik answered

It seems that you have set up a webhook to be triggered when you create inventory in your system. However, you are facing an issue where the webhook is not triggered when you create a new order or edit an existing order.

Here are some possible reasons for this issue:

Webhook Configuration: Double-check the webhook configuration to ensure that it is set up correctly to respond to order creation and order update events. Make sure that the correct endpoints and event triggers are specified.

Event Trigger Settings: Verify that the events for order creation and order update are correctly configured to trigger the webhook. If the events are not properly configured, the webhook won't be called when those actions occur.

Authorization and Authentication: Ensure that the webhook endpoint is accessible and properly authenticated to receive the webhook notifications. If there are authentication issues, the webhook may fail to trigger.

Error Handling: Check if there are any errors occurring during the webhook execution. Make sure that the webhook endpoint can handle the data sent from the system and respond with an appropriate status code to confirm receipt.

Webhook Service Reliability: Confirm that the webhook service or the server hosting the webhook endpoint is reliable and operational. If the webhook service is down or facing issues, it won't be able to receive and process webhook requests.

Log and Monitor: Implement logging and monitoring for the webhook to track incoming requests and responses. This can help you identify any issues or errors that might be occurring during the webhook process.

Test and Debug: If possible, try testing the webhook manually using tools like Postman to ensure it works as expected. Debugging the webhook setup can help you identify and resolve any issues.

If you have reviewed all the above points and are still experiencing issues with the webhook not triggering for order creation or updates, consider reaching out to the webhook provider or consulting their documentation or support resources for further assistance.

10 |2000

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

anayooleru avatar image
anayooleru answered

Thanks @ parquet76 and everyone. The issue was uninstalling the app and reinstalling it when permissions change.

10 |2000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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