Q: Webhooks to my endpoint are not delivered
There are several factors that can prevent you from getting webhooks from Ecwid.
Webhooks are added to an existing application
If you registered your app without webhooks functionality and added it later on, please make sure to reinstall the app for the changes to apply faster in Ecwid.
Application is not installed
When you are expecting a webhook from Ecwid after a certain event, please make sure that you have a registered app that has all webhook details specified. Set up webhooks
Application is missing the right webhook events
Webhooks in Ecwid are sent to an endpoint of an application only when event occurs and the application is set up for those webhook event types. Make sure that you specified webhook event types that you want to receive when setting up webhooks. Set up webhooks
Application is missing access scopes
Webhooks also depend not only on the event types specified for them, but also for access scopes that your application has. For example, if you want to receive webhooks about new orders, then your app must request read_orders
access scope from a store.
Your endpoint is not responding to requests with 200 OK status
When an event occurs, Ecwid will immediately try to send a webhook to your endpoint. However, if it fails to respond with 200OK response status or it has errors in the response (from PHP code, for example). Ecwid will not be able to deliver this webhook to your endpoint, because it failed to accept it.
This case also includes situations when your endpoint is performing redirects to other pages. In that case, it responds with 301 HTTP code, thus the webhook isn't delivered properly.
Try sending a dummy POST request to your webhooks URL and see if it accepts the request correctly with 200OK HTTP status code. Postman is great for testing the requests.
Ecwid can't access your endpoint
When setting up webhooks, make sure that your endpoint is publicly accessible by any resource (no local servers, etc.). This way, Ecwid services can successfully send and deliver POST requests to your endpoint.
If you made sure that all of the above steps are not concerning your case, please contact us and we will help you.
Q: I receive webhooks for events that already happened
When your application isn't sending 200OK
HTTP response back to Ecwid, the webhook event counts by Ecwid as not delivered. Such webhooks are sent again to the application URL according to the scheme described in Processing webhooks
Hence, if your app somehow got the webhook the first time, it will receive more of the same webhooks until Ecwid receives back the 200OK
response from your app or the 48-hour timeout is over.
So please make sure that your webhooks endpoint always respods with 200OK
HTTP response upon successfully receiving the webhook from Ecwid.
Q: I receive webhooks with a delay
Webhooks in Ecwid are sent out to many applications every minute. We have several servers processing the delivery of webhook requests.
When there are too many events that need to be processed, a queue is created to deliver those requests to their respective URLs. Also, sometimes the application URLs are not responding in a proper way, so we perform retries to make sure we deliver the webhooks.
All these factors can influence on when your app is going to get the webhook. So it may be delivered with a delay, which size depends on the load of our servers.
Q: I receive webhooks with lower case signature (applicable to services that use case-insensitive fashion, e.g. Cloudflare)
You can replace the verification code from the PHP example with this one:
// Verify the webhook (check that it is sent by Ecwid)
if (strtolower($name) == "x-ecwid-webhook-signature") {
// other code...
}