Confluence cloud webhook registration through addon fails randomly

We are registering a webhook inside confluence cloud through an addon which we found in the below link
Documentation link-

For this multiple API calls are made from our end as well as from the Confluence side.

Below is the process

  1. UPM token creation
    Method- GET
    Url- {user domain}/wiki/rest/plugins/1.0
    Description- API returns UPM token in the header that is used in next API calls

  2. Plugin creation
    Method- POST
    Url- {user domain}/wiki/rest/plugins/1.0
    Description- Through this API Plugin Url is sent to the confluence cloud in the body and in return receives JSON data that contains id in it.

  3. Webhook registration
    Description- In this step, the Confluence server makes a GET call to the plugin Url provided by us in the previous step and an app descriptor file is sent in response that contains a unique key to identify the app along with webhook event and webhook Url.

  4. Webhook Url verification
    Description- Here the confluence server verifies the webhook Url by making a POST call.

  5. Plugin verifcation
    Method- GET
    Url- {user domain}/wiki/rest/plugins/1.0/pending/{{id}}
    Description- This is the final step to verify the status of the webhook creation process.

The whole process works fine and we are able to successfully register webhooks in the confluence cloud but sometimes the webhook registration process fails due to the following reasons
The 3rd and 4th steps are not completed from the Confluence side ie. we don’t receive any calls from the confluence cloud to our end even after providing the proper plugin Url.

Are there some different criteria that need to be fulfilled for “key” in the App descriptor file? Or is there some additional key that needs to be passed in the app descriptor?
Any help is appreciated.

Kuldeeep K