Chapter 06 — Webhooks and real-time data4 min read
Chapter quiz
Test yourself
You've learned what webhooks are, how they work, and why they matter for real-time integrations. Let's see what stuck.
Polling vs. webhooks
Your app needs to know immediately when a customer's payment goes through on Stripe. What's the most efficient approach?
What's the main problem with polling?
How webhooks work
When Stripe sends a webhook to your server, what HTTP method does it use?
What is a 'webhook URL'?
You receive a webhook with "type": "customer.subscription.deleted". What does this tell you?
Security and reliability
Why do webhook providers include a signature header (like Stripe-Signature) in their requests?
Stripe sends a webhook but your server is temporarily down. What happens?
You're done with Chapter 6. You now understand the push vs. pull model for data: APIs let you ask for information (pull), and webhooks let information come to you (push). When your engineering team talks about setting up webhook integrations, subscribing to events, or verifying signatures, you'll know exactly what they mean.