Receive real-time notifications when events occur across FlexyPe products.
Webhooks let FlexyPe notify your systems the moment something happens across any FlexyPe product — a customer abandoning a session, viewing a product, or completing a purchase for the first time. Instead of polling for updates, your endpoint receives a POST request with the event payload as soon as it fires.
Your endpoint must return HTTP 200 within 10 seconds to acknowledge receipt.
Return 200 immediately, then process the payload asynchronously — add it to a queue or background job rather than doing the work inline. This keeps you well within the timeout window.
Any non-200 response, or no response within 10 seconds, is treated as a delivery failure and triggers a retry.
Each event has a unique X-Event-Id header. Use this value to deduplicate events — retried deliveries carry the same X-Event-Id as the original attempt, so you can safely ignore duplicates.
Always implement idempotency checks. Due to retries, your endpoint may receive the same event more than once.
const processedEvents = new Set();app.post('/webhook', (req, res) => { const eventId = req.headers['x-event-id']; if (processedEvents.has(eventId)) { return res.status(200).json({ received: true }); } processedEvents.add(eventId); // Process the webhook payload...});
In production, persist processed event IDs in a database rather than an in-memory Set, so deduplication survives server restarts.
Use the Test button on your configured webhook in the FlexyPe dashboard to send a sample payload to your endpoint. Do this before going live to confirm your verification logic and response handling are working correctly.
Test your endpoint thoroughly before processing production events — this helps catch issues with verification, response timing, and payload parsing early.