API Reference

Webhooks

What are Webhooks?

Webhooks are a form of communication between different systems, where one system automatically sends data to another system when certain events occur. Unlike traditional APIs, where a client makes a request to a server and waits for a response, in webhooks, the server sends information to the client.

Types of Webhooks

Synchronous Webhooks

In a synchronous webhook, the request and response happen simultaneously. This means that the system configuring the webhook (client) expects an immediate response after the event is triggered. This type of webhook is useful in situations where immediate confirmation of event processing is required.

Asynchronous Webhooks

In the case of asynchronous webhooks, the event is sent to the configured system at a later time, without the client needing to wait for an immediate response. This type of webhook is ideal for processes that can occur in the background and where an instant response is not necessary.

How Do Webhooks Work?

Flow of webhooks.
  1. Configuration: A client sets up a webhook by providing a URL where the data should be sent.
  2. Event Trigger: When a specific event occurs (such as a payment being made), the server triggers a notification to the configured URL.
  3. Reception and Processing: The system that receives the notification processes the data according to its business rules.
    Webhooks are powerful tools for system integration, allowing the automation of workflows and real-time data transfer. Understanding the difference between synchronous and asynchronous webhooks is essential for choosing the approach that best suits your system's needs.