webhook
/ˈwɛb.hʊk/noun
A webhook is an automatic HTTP request that one application sends to another when a configured event occurs.
The payment provider sends a webhook when payment succeeds.
A webhook reports an event from one application to another. An online shop might receive a notification when a payment succeeds, or a CRM system might receive a newly completed contact form. The receiving application does not have to keep asking for new data.
How does a webhook work?
The receiving application provides a URL and registers it with the sending service. When the chosen event occurs, the service sends an HTTP request to this Glossary · In briefendpointAn endpoint is an address at which an API makes a particular resource or action available.Read more. The request usually contains event information, such as an order number and new payment status.
The recipient checks the request's validity, processes its data and returns an HTTP status code. Processing must account for requests that fail or arrive more than once. A service may retry an undelivered webhook later.
Webhooks and APIs
Webhooks and Glossary · In briefAPIAn API is a defined way for software to exchange data or call functions in other software without needing to know how that software works internally.Read more both connect applications, but differ in what initiates the exchange. With an ordinary API request, an application asks for data itself. Regularly checking whether something has changed is called polling.
With a webhook, the sending application initiates contact when a configured event occurs. The recipient does not need to keep checking. It can still use an API afterwards for additional data or a follow-up action.