Skip to main content

Webhooks

Webhooks are a way for applications to communicate with each other automatically. Instead of constantly asking (or polling) another application if it has new data, the application will tell (or push to) you whenever there is new data. This method of communication is advantageous as it provides real-time updates and significantly reduces unnecessary network traffic.

Managing webhooks

The management of webhooks occurs on the "Webhooks" tab in the Customer Portal where customers can create webhook endpoints. These endpoints will receive a POST request when a specified event is triggered.

Here's a simple breakdown of how a webhook works in the EnableNow ecosystem:

  1. Setting Up a Webhook: A webhook first needs to be configured in the EnableNow customer portal, specifying the URL where the POST request should be sent and which events should trigger this request. This process is done through the "Webhooks" tab in the customer portal.

  2. Event Trigger: Once the webhook is set up, EnableNow monitors for the specified events (like categorizationjob.completed or transactions.fetched). When one of these events occurs, EnableNow prepares to send out a POST request.

  3. Sending POST Request: When the event is triggered, EnableNow packages all relevant data into a payload. The payload is a data format in JSON, which includes information about the event itself (event property) and specific details related to the event (data property).

  4. Receiving Application's Response: The POST request is then sent to the webhook URL specified during the setup. The application on the receiving end of the webhook URL is expected to accept this request, unpack the payload, and perform whatever action it was programmed to do with the data.

It's essential to note that the receiving application must be set up to accept POST requests and handle the incoming data appropriately. In case of any failures in handling the request, EnableNow will not send the request again.