Webhooks don't fire

Hi all, and thanks already for your help.
I configured 2 webhooks, but they don't fire when there are new orders.
What am I doing wrong?
The webhooks are configured via Postman. And must deliver their info to https://webhook.site/. This is a test site for webhooks which I use to see what info the webhook provides.
All other test webhooks from, for example, MyParcel arrive but nothing from Lightspeed.
The postman config for new orders is:
post https://{{api_key}}:{{api_secret}}@api.webshopapp.com/nl/webhooks.json?webhook[isActive]="true"&webhook[itemGroup]="orders"&webhook[itemAction]= "created"&webhook[language]="nl"&webhook[format]="json"&webhook[address]=https://webhook.site/967ca957-0b27-42ca-a034-3495451048bc
and for paid orders is:
post https://{{api_key}}:{{api_secret}}@api.webshopapp.com/nl/webhooks.json?webhook[isActive]="true"&webhook[itemGroup]="orders"&webhook[itemAction]= "paid"&webhook[language]="nl"&webhook[format]="json"&webhook[address]=https://webhook.site/967ca957-0b27-42ca-a034-3495451048bc
The reply from the webhooks are good. It returns an ID. A reply is shown below. So it looks good but nothing happens.
{
"webhook": {
"id": 4120497,
"createdAt": "2021-10-14T16:19:36+02:00",
"updatedAt": "2021-10-14T16:19:36+02:00",
"isActive": true,
"itemGroup": "products",
"itemAction": "*",
"language": {
"id": 1,
"code": "nl",
"locale": "nl_NL",
"title": "Nederlands"
},
"format": "xml",
"address": "https://requestb.in/17hcl441"
}
}
What am I doing wrong.
Thanks and hope there is somebody who can help me.
5 comments
Hi,
Can you send me a private message with your shop ID or URL? I will then have a closer look to see what's going wrong.
Hi Ali,
Thanks looking into it for me.
Hi @RPVB,
When you do the POST to the webhook endpoint, I see you're sending the data as parameters, this isn't the way to create the webhooks.
You need to send it in the body of the response.
Oke. But why is there a good response from the webhook? If I post via Postman? No 4xx response. In my opinion it should work.
Underneath the response:
{
"webhook": {
"id": 4123442,
"createdAt": "2021-10-23T21:11:49+02:00",
"updatedAt": "2021-10-23T21:11:49+02:00",
"isActive": true,
"itemGroup": "products",
"itemAction": "*",
"language": {
"id": 1,
"code": "nl",
"locale": "nl_NL",
"title": "Nederlands"
},
"format": "xml",
"address": "https://requestb.in/17hcl441"
}
}
And this is the post, send with parameters:
Sorry Lucien,
Ik had je post niet goed genoeg gelezen. Maar wat bedoel je met "You need to send it in the body of the response."
Hoe kan ik iets sturen in de body van response? Je moet toch eerst een response krijgen dmv een post? Is er een vervolg actie gewenst? Zo ja wat voor actie?\
Ander ding. Ik heb de via jullie postman endpoint colection de webhooks aangemaakt. Kan mij lastig voorstellen dat jullie dit maken en het niet functioneert.
https://developers.lightspeedhq.com/ecom/introduction/postman/
Issue is resolved by creating a new webhook with the data in the body.