Now that you understand the processing flow and webhook events for each entity (Import, File, Document), here’s how to configure webhook delivery and implement robust webhook handlers.
To receive state change events, you’ll need:
Contact your account administrator for webhook setup, IP range information, and HMAC signature configuration.
Webhooks are triggered on state transitions and document updates, ensuring you receive timely updates without redundant notifications.
All webhook events follow this consistent structure:
type - Event type identifier (matches state transitions)id - Unique event identifier (use for idempotent processing)timestamp - Event creation timestamp in ISO 8601 formatdata - Event payload containing the entity instance (Import, File, or Document object)version - Event schema versionNote: Document data structure is being refined. Refer to the API reference for the complete and current document structure.
This section covers best practices for implementing robust webhook handlers that process Invofox webhook events reliably and efficiently.
⚠️ Best Practice: Your webhook endpoint should respond with a 2xx status code in less than 30 seconds to ensure reliable delivery.
Why Quick Responses Matter:
Recommended Pattern: Verify signature → Queue event → Respond immediately
Every webhook event includes a unique id field. Use this to implement idempotent processing and prevent duplicate handling.
Why Idempotency Matters:
HTTP Status Codes:
Your webhook endpoint should return:
Invofox Retry Strategy:
When your endpoint returns an error or times out, Invofox will automatically retry up to 3 times:
Retry-After response header (default: 300ms if not specified)After exhausting retries, failed webhook deliveries are logged and can be viewed in your webhook dashboard.
HMAC Signature Verification:
Always verify the HMAC signature when you configure a webhook secret. This ensures events are from Invofox.
Key Security Points:
id to prevent duplicate processing