Webhooks

Problem

Your application needs to know when a payment succeeds. You could ask the payment provider every few seconds: “Finished yet?” But most requests would return nothing new.

Solution — Webhooks

You give the provider an HTTP endpoint.
When something happens, they call you:
Payment provider
      ↓
POST /payment-completed
      ↓
Your application
Core idea: webhooks let one system notify another when an event occurs.