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 var data = request form\["content"]; { "receiptid" "914568453493526528", "yourpaymentreference" "34a73594 f3b2 414c a5c9 58679530b418", "type" "payment", "result" "success", "judoid" 100502814, "originalamount" "5 00", "netamount" "5 00", "amount" "5 00", "currency" "gbp", "carddetails" { "cardlastfour" "1111", "enddate" "1222", "cardtoken" "sof xfmzmenor sj9mtrcvrxhw", "cardtype" 1, "cardscheme" "visa", "cardfunding" "credit", "cardcategory" "", "cardcountry" "us", "bank" "jpmorgan chase bank, n a " }, "cardaddress" { "address1" "cardholder house", "address2" "1 cardholder street", "town" "cardholder town", "postcode" "ab1 2cd", "countrycode" 826 }, "consumer" { "yourconsumerreference" "2b45fd3f cee5 4e7e 874f 28051db65408", }, } 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 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 mailto\ help\@judopay com and provide the notificationurl this is the url where you would like judopay's transaction api to post the webhook message to