New production WebHook subscriptions result in 504s


We are using Square payments in production and it works well. I try to add a second web hook subscription in Production for one of our products. I double-checked that all credentials in our project are correct. I do not receive any web hooks!

When I use the feature “Send test event” on the Square Developer Dashboard, I get a 504 error for every event I try.

I copied the exact same URL from the web hook subscription into Postman and copied the exact same JSON payload from your test event dialog into Postman and I receive the call. My call fails because I did not provide a signature in Postman so it is expected to fail, but I do receive the event. Same URL, same payload.

This is a rather urgent matter and I hope someone can help me.

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Payments API Webhooks
Webhook Event Logs
Handle Bookings Webhook Events

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

This did not help at all.

It seems like you’ve done the right steps in setting up the webhook subscription and testing it. The fact that you’re receiving the webhook call in Postman indicates that your endpoint is correctly set up and reachable.

The 504 error you’re seeing when using the “Send test event” feature in the Square Developer Dashboard typically indicates a timeout issue. This could mean that your server is taking too long to respond. Square expects your endpoint to return a 2xx status code within 10 seconds of receiving the webhook notification.

Please ensure that your server is responding within this timeframe. If the issue persists, it might be worth checking your server logs around the time the webhook events are sent to see if there are any internal server errors or other issues that could be causing the delay.

This answer was reviewed by @Lance-Square.

This issue still persists. I re-deployed our latest version of our product, but I do not receive any web hooks. This time, I test with Sandbox credentials. I triple-checked them to make sure they are correct. I can see all Square form controls in our website and interact with them, but I do not receive any web hooks. When I try using the developer dashboard to send test events, I get 504s. Always. I looked in the log file of my application and the web hook events never reached the handler function. I have no logs about any web hook. When I use Postman so send a POST message to the web hook subscriber function with the same payload as the test event from the developer dashboard, I not only see the expected entries in the application’s log file, but it also works perfectly fine. I checked the Windows Event Viewer and IIS logs and did not find any errors or warnings.

I would like to take a look at your Webhook Logs. Could I get your application id from your Developer Dashboard?