BUG: Refunds data (restock) in Order JSON incorrect immediately after refunds/create webhook.

garyrgilbert
Shopify Partner
397 40 163

 

Hi All,

 

Just got a strange message from one of my merchants that apparently refunds/create has started sending back incorrect information with regards to the restock. If I am not mistaken there was recently a change with regards to this and I am wondering this is related.

 

Here is a screenshot of the order from the admin.

garyrgilbert_0-1715326668829.png

We can plainly see that the refunds object has restock = true and the restock type = return.  Now here is the same order but I requested this when I got the refunds/create webhook (the erp system requires the entire order json for some reason for their process otherwise I would have sent just the webhook data..)

 

garyrgilbert_1-1715326841925.png

We can see that the refund ID is the same, the created_at datetime stamp is exactly the same, but the restock property is false, and restock_type is no_restock.  

 

I would label this as a bug since there is definitely a difference in the two even though timestamp and ids are the same.  This is also a recent thing since this code has been in production since November of last year.

 

EDIT:

I can now confirm that the restock and restock_type fields are also incorrect in the refunds/create payload.  I would have thought this would be atomic since the restock information is provided when the refund is created, why is it that this information gets updated AFTER the refund is created. It makes no sense to me.

 

Edit 2:

I can confirm that the webhook payload delivered by refunds created through the API are correct, only refunds created via the shopify ADMIN are delivering an incorrect payload, which is then later modified.

- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
Replies 0 (0)