Receive real-time notifications when events occur in your Organiko.ai account
Webhooks allow you to receive real-time HTTP notifications when specific events occur in your Organiko.ai account. Instead of polling the API for changes, Organiko.ai will POST event data to your specified endpoint.
Create an HTTPS endpoint on your server that can receive POST requests from Organiko.ai.
Use the API to register your webhook endpoint and specify which events you want to receive.
Trigger test events from the Organiko.ai dashboard or API to verify your endpoint is working correctly.
Triggered when a purchase order is certified for organic compliance.
Triggered when inventory is allocated to a sales order.
Triggered when inventory levels or details are updated.
Triggered when inventory falls below minimum threshold.
Triggered when a subscription tier is upgraded.
Triggered when a subscription tier is downgraded.
Triggered when a subscription is cancelled.
Triggered when a payment attempt fails.
Triggered when a payment is successfully processed.
Triggered when a compliance issue is detected.
Triggered when a new integration is successfully connected.
Triggered when an integration is disconnected.
All webhook events follow a consistent structure:
idUnique identifier for the eventtypeEvent type (e.g., "order.certified")createdISO 8601 timestamp when event occurreddataEvent-specific data (varies by event type)previous_attributesPrevious values for updated fields (optional)Always verify webhook signatures to ensure requests are from Organiko.ai and haven't been tampered with.
Return a 200 OK response as quickly as possible. Process events asynchronously using a queue.
Use the event id to prevent processing the same event multiple times. Store processed event IDs.
Webhook endpoints must use HTTPS in production. HTTP endpoints will be rejected.
Organiko.ai will retry failed webhooks with exponential backoff. Your endpoint should handle duplicate deliveries gracefully.
Use the API to check webhook delivery status and failed deliveries. Set up alerts for persistent failures.
Your code should gracefully handle unknown event types as new events may be added in the future.
If your endpoint doesn't respond with a 2xx status code, Organiko.ai will retry the webhook:
| Attempt | Delay | Total Time |
|---|---|---|
| 1 (initial) | Immediate | 0 seconds |
| 2 | 5 seconds | 5 seconds |
| 3 | 30 seconds | 35 seconds |
| 4 | 5 minutes | 5m 35s |
| 5 | 30 minutes | 35m 35s |
| 6 (final) | 2 hours | 2h 35m 35s |
After 6 failed attempts, the webhook will be marked as failed and you'll receive a notification.
Use ngrok to expose your local server to the internet for testing:
Trigger test events via the API:
View webhook delivery history and debug failed deliveries:
/webhooksList all webhook endpoints
/webhooksCreate new webhook endpoint
/webhooks/:idUpdate webhook configuration
/webhooks/:idDelete webhook endpoint
/webhooks/:id/deliveriesView delivery history and logs