Webhook Builder
Get Started
To begin receiving webhook events in your app, follow these steps to create and register a webhook endpoint:
- Log in to the Glider Console .
- Navigate to Settings > Webhooks.
- Click the plus button in the top right corner.
- Enter your webhook endpoint's HTTPS URL in the Endpoint field.
- Select the event types you want to receive at your webhook endpoint.
- Click Save.
You can also create webhook endpoints programmatically. Refer to our webhook API documentation here for more details. Through the API, you can manage additional webhook configurations such as Authorization Headers, failure thresholds, and retry intervals.
Create Your Handler
Set up an HTTPS endpoint function to accept webhook requests via the POST method. Ensure your endpoint function:
- Handles POST requests with a JSON payload containing an event object.
- Quickly returns a successful status code (2xx) before executing any complex logic that might cause a timeout. For example, return a 200 response before updating a customer’s invoice as paid in your accounting system.
Handle Requests from Glider
Read the event data
Glider sends the event data in the request body. Each event is structure with a type
and all the related Glider resource data under it
Handle the event
As soon as you have the event object, check the type to know what kind of event happened. You can use one webhook to handle several different event types at once, or set up individual endpoints for specific events.
Return a 200 response
Send a successful 200 response to Glider as quickly as possible because Glider retries the event if a response isn't sent within reasonable time. Write any long-running processes as code that can run asynchronously outside the webhook endpoint.
Test the webhook
Simply create a glider campaign and simulate a user end to end journey (visit the payment form and pay with your preferred payment method). If set up correctly your endpoint will receive all the invoice update events in real-time.
If you need to test and research on webhook events body payload before start developing your Handlet you can just simply use one of the following free online service as your webhook endpoint:
Updated 5 months ago