The order payment webhook for those orders wasn't fired no idea why.
I had the same problem Orders ids:
But for those orders work fine the webhook was fired
The only difference is in the case that the webhook was fired as expected the orders was created as draff orders in the Dev store admin site, and the orders that the webhook didn't work was created wiht the checkout in the dev online store. the order webhook functionality is not avalible for development stores? i mean this becasue the checkout show this message "This store can't accept real orders or real payments".
I also have a Customer creatio WebHook that works fien in both enviroments.
Hello @FabianGonzalez, welcome to the community!
I took a look at our logs for these 6 order ids, and I found that the 4 you listed had been attempted, but your app is responding with a 400 error. We retry these webhooks up to 19 times over a two-day period using an exponential backoff. I can see today these events are around attempt #11, so, if you can figure out why your app is having trouble consuming the events by the end of the day you could still consume them as we'll retry them a few more times.
Good luck @FabianGonzalez !
Hi @james-langille this is weid those order was created through the checkout
1- click on online store on the admin site
2- go to catalog
3- select but a producto
4-pay using bogus testing payment gateway
for those orders 3086780956863 and 3086720663743 all works fine
1- select create orden in the admin site
2- select a producto and a customer
3-pay using bogus testing payment gateway
the only difference is the way to create the order we expect in or API endpoint an spesific cotnract for the order we got that structure getting the json structure that the webhook send when we create the order in the admin site with the create order option. The only way that the api respond a 400 error is if shopify send a diifferent contract. we don't thisnk that that happen becuase must be the same contract no matter from where the order was created right?
1-you can chekc thos other 2 orders that works as expected and see what is the different in your system vs the other 6 orders?
2-also how we can check thos logs that you mention to compare the contracts?
3-we are going to change or endpoint to recive an object and log that object to see if there is any difference again to get a 400 error is becuase the contract is different, for the momento i don't see another explanation for this.
Hi @james-langille, I found the issue is wiht the propertie user_id under the Order contract, when we tested creating the order from the admin site this propertie come with a value so we define as long bot not nullable and looks like is nullable, there is a palcer where we can valdiate the Order contract? to be sure about the properties and how define them?
I believe you can see the different schemas in the api reference here: https://shopify.dev/docs/admin-api/rest/reference/events/webhook, which I believe will also show you which fields are nullable.