What is Webhook?
TL;DR
A webhook is an automatic notification sent from one app to another when something happens, like getting a text message when you receive an email.
Example
How webhooks work:
- You tell App A: "When X happens, notify this URL"
- X happens in App A
- App A immediately sends data to your URL
- Your system receives the data and does something
Real examples:
- Stripe webhook: When payment succeeds → update your database
- GitHub webhook: When code is pushed → trigger build process
- Shopify webhook: When order is placed → notify warehouse
- Slack webhook: When form is submitted → send message to channel
Without webhooks (polling): Your system asks "Any new orders?" every 5 seconds. Wastes resources and has delays.
With webhooks (push): Shopify tells you the moment an order arrives. Instant and efficient.
Explanation
Webhook Anatomy
A webhook is just an HTTP request. When triggered, the source app sends:
To: Your specified URL (the "endpoint") Method: Usually POST Body: Data about what happened (JSON format) Headers: Authentication, content type
Example Stripe webhook payload:
{
"type": "payment_intent.succeeded",
"data": {
"amount": 5000,
"currency": "nok",
"customer": "cus_123abc"
}
}
Your server receives this and processes it accordingly.
Security
Always verify webhooks are legitimate:
- Check the signature/secret provided by the service
- Use HTTPS endpoints
- Validate the payload structure
- Return proper response codes
Why It Matters
For Business Owners
Webhooks enable automation. Instead of manually checking systems, things happen automatically. Order comes in → invoice generates → warehouse notified → customer emailed. All instant, all automatic.
Webhooks connect your tools. Your payment system, email tool, CRM, and inventory can all talk to each other in real-time.
Webhooks are more efficient than alternatives. Constant polling ("checking") wastes server resources. Webhooks only fire when needed.
Common Use Cases
- E-commerce: Order → fulfillment → shipping notifications
- SaaS: Subscription changes → billing updates → access control
- Communication: Form submission → team notification → CRM update
- Development: Code push → tests run → deployment triggers
If you use Zapier, Make, or similar tools, you're already using webhooks behind the scenes.
Need help with your digital project?
We build websites, apps, and digital solutions for businesses.
Get in touch