A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately.
For using webhook service clients have to register an API application that will have an API key, api-admin credential, and an encryption file for further authentications. This is taken place for a successful webhook event subscription validation. For implementing the webhook service follow the given steps.
Available webhook event slugs and their provided data are listed at the end of the webhook document.
This API endpoint is used to subscribe to a webhook event. For subscribing to an event minimum of one event slug and an URL is required. Before initiating the validation flow, the system will generate a string that will act as a challenge code.
Use this challenge code as a query parameter to make an HTTP POST to your webhook endpoint.
Your application must compute the challenge_response using the provided encryption file. Return both the challenge_code and challenge_response in a JSON payload with a 200 OK status.
challenge_code - given challenge code through your webhook endpoint as a query param,
challenge_response - encrypt the challenge code using provided encryption file keys,
On receiving the validation response, the system will verify by computing the challenge_response and comparing it with the challenge_response returned by the app.
If the challenge_response is successfully verified, then the webhook is ready to be used in subscriptions. If the verification fails, an email will be sent to the admin user, for validating again use the Webhook Subscriber Validation endpoint, which is given below. if the validation fails continuously the subscription will be blocked permanently.
An event in the system will post a request to the subscribed URL with a header and payload data. the request header contains a webhook signature which is an encrypted event slug and authorization, to identify the event decrypt the event signature using provided encryption file keys, and the clientSecret Key for event-signature is "webhook-event".