Administration

Webhooks

Webhooks automatically send data to external services when events happen in your store. Use them to connect your store to other tools, automate workflows, and sync data.


Understanding webhooks

When an event happens (like a new order), your store sends data to a URL you specify. The external service receives this data and can act on it.

Common uses:

  • Inventory sync - Update stock in other systems
  • Order notifications - Send orders to fulfillment services
  • CRM updates - Add customers to marketing tools
  • Accounting - Send transactions to bookkeeping software

Tip

Webhooks work in real-time. As soon as an event happens, data is sent to your configured endpoints.


Creating a webhook

  1. From your admin, go to Administration > Webhooks
  2. Click Create Webhook
  3. Configure the webhook:
    • Name - A descriptive name
    • URL - Where to send data
    • Events - Which events trigger it
    • Secret - For verifying requests (recommended)
  4. Click Save

Available events

Choose which events trigger your webhook:

Order events

  • order.created - New order placed
  • order.updated - Order details changed
  • order.fulfilled - Order shipped
  • order.cancelled - Order cancelled

Product events

  • product.created - New product added
  • product.updated - Product changed
  • product.deleted - Product removed

Customer events

  • customer.created - New customer registered
  • customer.updated - Customer details changed

Tip

Only subscribe to events you need. Unnecessary webhooks create extra work for your systems.


Webhook security

Protect your integrations:

Webhook secrets

Use a secret to verify requests came from Hanut.io:

  1. Set a secret when creating the webhook
  2. Your endpoint receives the secret in a header
  3. Verify the secret matches before processing

HTTPS only

Always use HTTPS URLs for webhooks. This encrypts data in transit.

Important

Never expose sensitive data in webhook endpoints. Verify all incoming requests before acting on them.


Testing webhooks

Before relying on a webhook:

  1. Open the webhook settings
  2. Click Send Test
  3. Check that your endpoint received the data
  4. Verify your integration processes it correctly

Test with each event type you've configured.


Troubleshooting

Webhook logs

View recent webhook activity:

  1. Go to Administration > Webhooks
  2. Click on a webhook
  3. View Recent Deliveries

Logs show:

  • When data was sent
  • Response received
  • Any errors

Common issues

Endpoint not receiving data:

  • Check the URL is correct
  • Verify your server is running
  • Check firewall settings

Authentication errors:

  • Verify the secret is correct
  • Check your endpoint's validation logic

Timeout errors:

  • Your endpoint must respond within 30 seconds
  • Process data asynchronously if needed

Next steps

Previous
User management