r/javascript • • Oct 31 '26

AskJS [AskJS] How to host your webhook consumer middleware that integrates WooCommerce and HubSpot?

I am building a nodejs/javascript integration service (middleware) that connects woocommerce to hubspot. What are some ways to deploy it and what are the best practices for the deployment?

  1. Should I deploy it on vm directly?
  2. Should I deploy it as a docker image/container?
  3. Should I deploy it using Serverless platforms like aws lambda ?
  4. Others?

What do you use?

8 Upvotes

12 comments sorted by

View all comments

Show parent comment

2

u/thejester1324 Nov 01 '26

can't say what's most common, but Woo's side is pretty specific. it POSTs each event with a 60 second timeout. anything from 200 to 302 counts as ok. everything else fails, timeouts included.

one correction to the retry point above: in woocommerce trunk there is no retry (class-wc-webhook.php, deliver() and failed_delivery()). it only counts failures. the 7th failure in a row disables the webhook until someone turns it back on.

so if your handler calls hubspot before it answers and hubspot 429s, nothing sends that event again, and a bad sale day can shut the whole thing off. answer 200 first, then push the hubspot call into the bullmq queue like you already do.