Webhooks
Webhooks for the LeadFinder
Webhooks
LeadFinder Webhooks are used to receive events from the LeadFinder SDK. This documentation will help you understand how to integrate with our webhook system effectively.
Webhook specifications
- The webhook is sent to the URL specified in the webhook configuration.
- The webhook is sent as a POST request with the following headers:
Content-Type: application/jsonx-signature: Webhook signature
- The webhook is sent with the following body:
event- The event that occurreddata- The data associated with the event
- The sequence or order of webhooks deliveries are not guaranteed.
Your responsibilities
- Your api must return a 200/201 status code.
- Your api must respond within 10 seconds.
- If a request times out or returns a non-200/201 status code, the webhook will be retried up to 5 times with exponential backoff of 1 second.
- If a request is successful, the webhook will be marked as delivered and will not be retried.
- If a webhook does not return 200/201 and retries have been exhausted, the webhook will be marked as failed and will not be retried for future events.
Webhook signature
The webhook signature is a hash of the webhook body and the webhook secret.
import { createHmac } from 'crypto';
const signature = createHmac('sha256', 'YOUR_WEBHOOK_SECRET').update(JSON.stringify(body)).digest('hex');to verify the signature, you can use the following code:
const signature = createHmac('sha256', 'YOUR_WEBHOOK_SECRET').update(JSON.stringify(body)).digest('hex');Available Events
Our system emits the following types of events:
Order Data Events
ORDER_DATA_STARTED: Triggered when order data processing beginsORDER_DATA_COMPLETED: Triggered when order data processing is successfully completedORDER_DATA_FAILED: Triggered when order data processing failsORDER_DATA_PROGRESS: Provides progress updates during order data processing.