Webhooks are a powerful tool for receiving information about API events as they happen. An event, such as a payment being made or receiving a Pix, is an activity that occurs outside your system. With webhooks, you can create or configure integrations that allow notifications to be automatically sent to a specific endpoint whenever an event occurs.

Why Use Webhooks?

Resource Savings

Instead of your application having to make constant requests to check for updates (polling), webhooks send notifications only when a specific event occurs. This reduces bandwidth usage and processing, saving resources and improving the overall performance of the application. Resource savings can also lead to reduced operational costs and greater efficiency in infrastructure management.

Reliability

Webhooks provide a reliable way to ensure that important events are notified immediately. Our webhook system implements retry mechanisms, which increases the reliability of communication. This ensures that even in cases of temporary failures or interruptions, notifications will be retried until they are correctly received by the system.

Reduced Latency

By receiving notifications in real-time, the system can quickly respond to events, which reduces latency compared to polling-based approaches. This is particularly important for applications that require quick responses.

Better Scalability

Webhooks allow your system to react to events without overloading the API with polling requests. This can improve scalability by preventing the application from having to handle a large number of simultaneous requests to check for updates, allowing the system to focus on processing actual events as they occur.

How Can I Identify the Source of Webhook Triggers?

We use dynamic IPs to send our webhooks, meaning that the IP addresses may change with each sending. To ensure the security and proper identification of webhooks sent by our platform, we recommend that you configure a custom header in the webhook. Below is an example of how to configure it:

{  
  "uri": "{your_webhook_url}",  
  "enabled": true,  
  "headers": {  
    "headerName": "{your_header_name}"  
  }  
}

By configuring the webhook this way, whenever we send a webhook, we will include the header you have set, allowing the identification and authentication of the messages.