Webhooks are HTTP POST requests that notify your app when something happens. Stripe charges a card → sends POST to your webhook URL → you handle payment success. Reverse of APIs (you call them → they respond). Webhooks: they call you when event happens. Great for async events—user subscribes on Stripe, Stripe notifies you. Alternative to polling ("are there new payments?" every 10 seconds). Every major platform (Stripe, GitHub, Shopify) uses webhooks.
Implement webhooks to notify external systems when events happen in your app, or consume webhooks from services you integrate with (Stripe payments, GitHub commits, Shopify orders). Essential for async integrations. Webhooks work well when: events are infrequent, you want real-time notification, or polling is inefficient. Provide webhooks if you build a platform/API.
System Design Patterns
Push notifications via HTTP POST