Webhooks
Webhooks are an optional secure service provided by Judopay to use to notify your system when a transaction or event has taken place.
The benefit of using webhooks means you do not need to pull information from the Judopay API for every event.
The transaction or event data is passed via a POST request to your notificationUrl using the content parameter.
The time-out default value is 15 seconds.
The example below shows the information the webhook message can contain:
It is recommended you create a script to retrieve the data from the content parameter in the receipt model.
The data can then be parsed and used as normal.
To receive webhooks you are required to use TCP Port 443.
From the Judopay Portal:
From the side menu, select Your apps. Select the app you wish to edit. For the purpose of this exercise, Document Testing App is selected.
Select Webhooks configuration.
Select the Webhooks for your required transaction type(s):
- Enable Webhooks Payment
- Enable Webhooks Collection
- Enable Webhooks PreAuth
- Enable Webhooks Refund
Add your Webhooks URL.
Click Save Webhooks.
The Add authentication section appears. Click Add authentication.
Confirm and click Add authentication.
Your unique username and password for authentication will be displayed. The username and password will be combined with a colon separating them and will be encoded using Base64.
Click Save Webhooks. The selected Webhooks will now be authenticated using this method. Judopay will send this username and password along with every request.
Webhooks will not work until you add the authentication.
If you have any issues enabling webhooks, contact Customer Support and provide the notificationUrl. This is the URL where you would like Judopay's Transaction API to POST the webhook message to.