1. Overview
Webhooks are an efficient way for Infigo storefronts to communicate with external systems by automatically sending real-time data when specific events occur. Unlike APIs, which require constant polling to check for updates, webhooks allow for immediate notifications, saving time and resources. This article explains how to set up webhooks in Infigo, common use cases, troubleshooting issues, and best practices for integration.
2. Contents
- Overview
- Contents
- Key Points and Takeaways
- Problems This Solves
- Key Settings
- Scenario-Based Guide
- Scenario 1: Setting Up a Webhook for Order Status Updates
- Scenario 2: Debugging a Failing Webhook
- Scenario 3: Using Webhooks for Integration with Payment Gateways
- FAQs
- Troubleshooting
- Alternate Search Terms
3. Key Points and Takeaways
- Webhooks provide a real-time mechanism to push data from Infigo to external systems when events occur.
- They reduce the need for constant API polling, improving efficiency.
- Common events for webhook triggers include order status changes, payment updates, and product changes.
- Correct configuration of webhook URLs is critical for ensuring successful integration.
4. Problems This Solves
- Resource Efficiency: Eliminates the need for constant API polling.
- Real-Time Notifications: Updates systems immediately when specified events occur.
- Seamless Integration: Enables automation with various external systems like Tharstern, Stripe, and other MIS platforms.
- Error Reduction: Minimizes manual intervention, reducing the potential for human error.
5. Key Settings
Setting Name: Webhooks Configuration
- Path: Configuration > Integrations / API > Webhooks
- Explanation: This is where you configure webhooks for your storefront. You specify information such as the endpoint URL, HTTP method (e.g. GET or POST), and define the type of events that trigger the webhook.
- Mode: Options include Immediate (for time-sensitive updates) or Delayed (to group events into batches, saving resources).
- Authentication Headers: You can add headers if the external system requires authentication.
- You may need to contact Infigo Support if you cannot immediately access this page. They will enable it for you.
6. Scenario-Based Guide
Scenario 1: Setting Up a Webhook for Order Status Updates
- Problem: You want to receive notifications whenever an order status changes, such as when an order is completed or shipped.
- Solution:
- Navigate to Configuration > Integrations / API > Webhooks
- Click on “Add”
- Enter a name for the webhook (e.g., Order Status Update), description and ensure the webhook is enabled.
- Specify the required mode. Options include Immediate (for time-sensitive updates) or Delayed (to group events into batches, saving resources).
- Provide the endpoint URL where the external system will receive the data.
- Choose the HTTP method (POST is typically used for such integrations).
- Specify the trigger type (e.g., Status Updated).
- Choose the data format (XML or JSON) and add any necessary headers for authentication.
- Save the webhook and test it using a service like Pipedream to verify it’s working correctly.
Scenario 2: Debugging a Failing Webhook
- Problem: You receive a 404 error when a webhook is triggered, indicating the endpoint URL is incorrect or not available.
- Solution:
- Double-check the endpoint URL in the Infigo webhook settings and ensure it matches the URL configured in the external system.
- Test the endpoint URL directly in a browser to confirm it is accessible.
- Verify that the authentication headers (if used) are correct and match those expected by the receiving system.
- Check logs in both Infigo and the external system to identify any mismatches or issues.
- Note: If still unresolved, contact Infigo support to ensure that permissions are correctly configured for the webhook feature.
Scenario 3: Using Webhooks for Integration with Payment Gateways (e.g., Stripe)
- Problem: Your payment gateway (e.g., Stripe) is not receiving notifications about completed payments.
- Solution:
- Log in to your Stripe dashboard and navigate to the Webhook settings.
- Ensure the endpoint URL matches the one specified in Infigo’s settings.
- Verify that events like payment_intent.succeeded are selected in the event types list.
- Check the logs in Stripe for specific errors, such as incorrect response codes (e.g., non-2xx HTTP codes).
- If issues persist, use tools like Pipedream or Webhook.site to simulate and debug the webhook events.
7. FAQs
- What is the difference between APIs and Webhooks in Infigo? APIs require constant polling for updates, while webhooks push information in real-time when an event occurs, saving resources.
- Can I batch multiple events into one webhook call? Yes, you can configure the webhook mode to Delayed, which batches events before sending them as a single call.
- What authentication methods are supported for webhooks? Infigo supports adding headers for API keys, tokens, and other authentication methods required by external systems.
- How do I verify if my webhook is working? You can test it using services like Pipedream or by examining logs in both Infigo and the external system.
8. Troubleshooting
- Persistent Issues: If the webhook is failing consistently, try accessing the storefront from another browser or device to rule out browser-specific issues.
- Contact Support: If issues remain unresolved, access the support section within your Infigo dashboard to raise a ticket or seek further assistance. Ensure you have the endpoint URL and logs ready when contacting support.
This comprehensive guide provides all necessary details to help users understand, set up, and troubleshoot webhooks within Infigo. By following these steps and scenarios, users can effectively integrate and optimize their storefronts for real-time updates.