Lehjah provides a robust webhook system that sends notifications for various events occurring within the platform. These webhooks allow you to listen to specific events and trigger actions based on them, enabling seamless integration with your existing workflows.

Setting up webhooks

To start receiving webhook notifications, you need to set up the webhook URLs for both the sandbox and production environments within the no-code admin platform. Once access has been granted to either environment, navigate to the Webhook section in the admin dashboard and configure your URLs.

Available webhook events

Lehjah sends notifications for the following events:

EventDescription
NEW_BUSINESSTriggered when a new business is registered or created.
NEW_SUBSCRIPTIONTriggered when a business subscribes to a plan.
SUBSCRIPTION_REQUESTTriggered when a business requests to be subscribed to a plan.
SUBSCRIPTION_EXPIREDTriggered when a business’s subscription expires.
NEW_TRANSACTION_CREATEDTriggered when a new single bank transaction is created.
TRANSACTION_UPDATEDTriggered when a single bank transaction is updated.
TRANSACTION_DELETEDTriggered when a single bank transaction is deleted.
RECORD_CREATEDTriggered when a new record is created (e.g., invoices, bills, and restocks).
RECORD_UPDATEDTriggered when a record is updated.
RECORD_DELETEDTriggered when a record is deleted.
INVENTORY_ITEM_CREATEDTriggered when a new inventory item is created e.g products.
INVENTORY_ITEM_UPDATEDTriggered when an inventory item is updated.
INVENTORY_ITEM_DELETEDTriggered when an inventory item is deleted.

Each event notification will include relevant data that you can use to manipulate or update your system in real-time.

Webhook reliability and retries

Lehjah follows industry-standard retry mechanisms to ensure the reliability of webhook notifications. If your server fails to acknowledge a webhook event, Lehjah will automatically retry delivering the notification. Make sure your server is configured to handle these retries and avoid processing the same event multiple times.

Sample webhook payloads

Below are sample payloads for each webhook event. You can use these examples to understand the structure of the data you’ll receive.

Conclusion

Webhooks provide a powerful way to stay in sync with events happening in Lehjah. Make sure to set up your webhook URLs in the admin platform and handle retries appropriately to ensure that your system responds effectively to these notifications.