Webhooks
Quoting Wikipedia, Webhooks are user-defined HTTP callbacks. They are usually triggered by some event.
You can build integrations that subscribe to certain events on Xola. When one of those events are triggered on Xola, an HTTP POST payload is sent to the configured URL.
For example, let's consider, that you want to be informed every time an order is created in Xola, so that you do some post-processing of your own.
For this you would need to do the following:
- Identify the event which is generated on order creation. Refer to this list of events, to identify the event. For our example, that would be the
order.create
event. - Expose a URL, which accepts JSON payload through
POST
. - Register the same URL as a webhook for the identified event :
order.create
.
Now, whenever an order is created in Xola, the order.create
event is fired, and a JSON payload, containing the relevant information, is POST
ed to your registered URL.
Updated 7 months ago