Throttling webhooks on bulk updates

I have my application configured to listen to customer updates via webhooks. My customers often make bulk updates to their customer directory using the import feature in Square. When they do this, Square attempts to send hundreds or even thousands of webhook updates to my application within a few milliseconds, crashing my application. Is there a way to throttle webhook updates so that Square only attempts to send a limited number per second?

Unfortunately, Square does not currently offer a built-in feature to throttle webhook updates. However, there are a few ways you can handle this situation:

  1. Implement a queue system in your application to process the incoming webhook updates in a controlled manner. This way, your application can handle a limited number of updates at a time, and the rest can be queued for processing later.
  2. Use a third-party service that can act as a middleman between Square and your application. These services can receive the webhook updates, throttle them, and then send them to your application at a controlled rate. :slightly_smiling_face:

Hi Bryan, thanks for the response. This would be a great feature to add. I had a customer update a few hundred records this morning and the webhook updates have been hitting my app every hour, processing a few before it crashes my app and the rest error out. Then, the remaining webhooks do it again an hour later. With a bit of throttling, my app would have no problem processing a few hundred requests in just a couple of minutes. The problem is that they all come within a few milliseconds and overwhelm my application server.

We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

1 Like

Thank you, that would be great! One other feature idea would be the ability to configure alerts for failed webhooks or API calls. Right now, I manually monitor the logs in the developer portal, but it would be great if I could receive an email when my application hits a specified failure threshold.

I’ll definitely pass this on to the team. :slightly_smiling_face: