Loading Depth Study
Preparing your workspace
A webhook allows one system to send an HTTP notification to another system when an event happens.
Normal APIs are often pull-based: a client asks for information when it needs it. Webhooks are push-based: the producing system sends a message when a relevant event occurs. Webhook receivers should verify authenticity, validate payloads, handle duplicate delivery, and retry safely. Event-driven communication can reduce repeated polling and is useful for payments, messaging, analytics, and integrations.
A payment provider can send a webhook when a payment succeeds, allowing the learning platform to update an order or subscription.
POST /api/webhooks/payment
Content-Type: application/json
{
"event": "payment.succeeded",
"paymentId": "pay_123",
"orderId": "order_456"
}The receiving API gets an event notification and can process the payment status update.