System Design
10. API Design and ManagementAnimated
Webhooks
The server calls you when something happens.
The idea
Instead of polling, a service sends an HTTP request to your URL when an event occurs.
Watch it work
Press play, pause, or step through. Some animations have settings you can change.
- current message
- earlier
- failure or attack
Instead of you polling, the provider calls your URL when something happens.
- step:
- 1/5
- from:
- Provider
- to:
- Your app
1/5
Time runs downward. Solid arrows are requests, dashed arrows are replies.
Step by step
- 1You register a URL
- 2An event happens
- 3The service posts to your URL
- 4You acknowledge quickly
Where it is used
Payments and integrations.
Watch out for
Verify signatures and handle retries and duplicates.