Responding to Webhook Requests
This section explains how your system should handle incoming webhook requests from TransFi Checkout.
Successful Acknowledgment
- A webhook delivery is considered successful when your endpoint responds with an HTTP status code in the
2xxrange (for example,200 OK). - Your system should validate the webhook payload before acknowledging the request.
- Return a
2xxresponse immediately after successfully receiving and validating the payload. - Ensure the webhook is processed within a reasonable time to avoid request timeouts.
Failed Deliveries
- Any response outside the
2xxrange will be treated as a failed webhook delivery. - Network failures or request timeouts may also result in a failed delivery attempt.
- TransFi may retry failed webhook deliveries based on the configured retry policy.
Best Practices
- Process webhook events asynchronously for long-running operations.
- Implement idempotent webhook handling to safely process duplicate webhook events.
- Log all incoming webhook requests and responses for monitoring and debugging.
- Secure your webhook endpoint by validating incoming requests before processing.