I tested curl and postman with the same payload URL and payload body I had in Github settings/hooks tab.
It works well in curl and postman but It doesn’t work on Github settings/hooks with with errors such as service timeout.
I am sure that payload URL is valid and webhook setting is right. Because it works well in localhost(using ngrok) at same code.
ps. I used Github enterprise host, API and repositories.