Set up your webhook endpoint
In order to receive webhook events in your application, create and register a webhook endpoint on your side.
You can either register a single web hook endpoint to handle all events, or register a different endpoint for each type of event.
Listen only to the event you are interested in
Identify the event you are interested in and listen only to those.
Remove events that are not useful to you or are not used anymore.
Create a webhook endpoint
Create an HTTP or HTTPS endpoint capable of receiving webhook requests through a POST method.
Your webhook endpoint must:
- handle
POSTevents with aJSON/Content-Type: application/jsonpayload - return a
200 - successresponse immediately (no payload required)
In case your endpoint is unavailable, or not responding correctly our hook mechanism will re-try the hook call. Retries will happen up to 5 times with longer intervals between each failed call.
Test your web hook endpoint
During the initial development use a Sandbox webhook, where you can manually trigger simulated web hook events to check
if your endpoint is working correctly.
You can also simulate success/fail scenarios via the Sandbox dialogs.
Dynamic web hook URL (templates / formatting)
Payment web hooks
We support web hook URLs formatting where you can insert the following placeholders:
- tenantSlug
- pointOfSale
- environment
For instance, you can create the following web hook URL:
https://my.server.com/webHook/{tenantSlug}?pos={pointOfSale}&environment={environment}
where if:
- tenantSlug = 'myTenant' - your tenant slug,
- pointOfSale = '123457890' - the POS id (in case of payment service hook)
- environment = 'production' | 'sandbox'
the called URL would be:
https://my.server.com/webHook/myTenant?pos=123457890&environment=production
This allows you to have a single webhook endpoint that can listen to multiple hook events from different sources.
Account information web hooks
We support web hook URLs formatting where you can insert the following placeholders:
- tenantSlug
- inquiryId
- environment
For instance, you can create the following web hook URL:
https://my.server.com/webHook/{tenantSlug}?inq={inquiryId}&environment={environment}
where if:
- tenantSlug = 'myTenant' - your tenant slug,
- inquiryId = 'ABCDEFGHIJK' - the id of the selected inquiry
- environment = 'production' | 'sandbox'
the called URL would be:
https://my.server.com/webHook/myTenant?inq=ABCDEFGHIJK&environment=production
You need to make sure that the resulting URL is a valid URL!