Developers
Developer Hub

Webhooks

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.



Example Webhook Model

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:

Example Webhook Message


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.



Enable Webhooks

To receive webhooks you are required to use TCP Port 443.

From the Judopay Portal:

enable webhooks

1

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.

2

Select Webhooks configuration.

3

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.

4

Click Save Webhooks.

5

The Add authentication section appears. Click Add authentication.

6

Confirm and click Add authentication.

7

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.

8

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.