Context
To improve and smoothen the payment flow between PAR Ordering and payment processors, we're introducing Webhooks. They help make payments even faster, easier and safer.
What is it?
So, very technically:
A Webhook is an HTTP-based callback function that allows lightweight, event-driven communication between two APIs (application programming interfaces). Webhooks are used by a wide variety of web apps to receive small amounts of data from other apps, but webhooks can also be used to trigger automation workflows in Git Ops environments.
In more user-friendly terms:
It's a link or a bridge between two APIs. So in our case, it would be a link between PAR Ordering's API, and the API of the payment processor.
How does it work?
Webhooks are being setup in a way that 'teaches them' about the actions they should be sensitive to. So, to set up a Webhook, the client gives a unique URL to the server API and specifies which event it wants to know about. Once the Webhook is set up, the server will automatically send the relevant payload to the client’s Webhook URL when the specified event occurs. So basically, Webhook is programmed to respond to a specific situation automatically.
For that reason, they are called 'pushers' sometimes, because they put the responsibility of communication on the server, rather than the client.
Please note: Webhooks will be enabled gradually for each payment processor.
Why is it useful?
- They eliminate the need for polling. This saves resources for the client application, because the server is responsible for 'pinging' the Webhook about the event, not the client
- They are quick to set up. If an app supports Webhooks, they are easy to set up through the server app’s user interface. This is where the client enters their app’s Webhook URL and sets some basic parameters, like which event they are interested in
- They automate data transfer. The payload is sent as soon as the specified event happens on the server app. This exchange is initiated by the event, so it happens as quickly as the data can be transferred from server to client - as real-time as any data transfer can be
- They are good for lightweight, specific payloads. Webhooks rely on the server to determine the amount of data it sends, leaving it to the client to interpret the payload and use it in a productive way. Since the client does not control the exact timing or size of the data transfer, Webhooks deal with small amounts of information between 2 endpoints, often in the form of a notification (which is exactly how it works for PAR Ordering)
Comments
0 comments
Please sign in to leave a comment.