In this article, you will learn what webhooks are and how to set them up to receive real-time information from Eventtia
What is a Webhook?
A webhook is a mechanism that enables one application to deliver real-time updates to another system whenever a specific event takes place. Unlike traditional APIs, which require one application to repeatedly check for changes (a process known as polling), a webhook instantly transmits data to a pre-configured URL as soon as the event occurs.
For instance, when you configure a webhook to alert you about the creation of a new attendee, Eventtia's software will promptly dispatch an HTTP POST request containing the new attendee's details directly to the designated URL you specified.
How to Set Up a Webhook?
To receive webhook notifications, you need to provide a destination URL where your system can listen and process the incoming data.
Here's how to do it:
- Go to the settings of your event and click on the 'Webhook' tab.
- Then, check 'Enable Webhooks' and click on 'Create'.
Then, follow the next steps:
-
Create a Listener URL
- You need to create an endpoint on your server or application that can accept HTTP POST requests. This endpoint should:
- Be publicly accessible (e.g., https://yourserver.com/webhooks/my-event)
- Accept POST requests
- Parse the request body (usually in JSON format)
- (Optional) Verify a token or signature for security
- You need to create an endpoint on your server or application that can accept HTTP POST requests. This endpoint should:
-
Test Your URL
- Before using it in production, we recommend testing the URL with tools like:
- https://webhook.site/
- Postman
- Insomnia
- This ensures that your endpoint is receiving data correctly.
- Before using it in production, we recommend testing the URL with tools like:
-
Configure the Webhook on Eventtia
-
Once your listener URL is ready and publicly accessible, paste it into the Webhook URL section of your event.
-
From there, you’ll be able to select the specific events you want to listen for, such as:
-
attendee_created
– when a new attendee is created -
attendee_updated
– when an attendee's information is updated -
event_created
– when an event is created -
event_updated
– when an event is updated -
payment_created
– when a payment is made
-
-
This is it. Your Webhook should be properly configured and running.
Recommended Security Practices
Make sure to respect the following guidelines for security purposes:
-
Always use HTTPS
This ensures that the data sent to your endpoint is encrypted and secure. -
Validate incoming data on your server
Please ensure that the data you receive aligns with the expected format.
You can also verify that the request is authentic by checking a shared secret, token, or signature.