Refund Error: cannot refund more items than were purchased

dsl3Jd
Shopify Partner
12 1 2

When testing "Refunds", we've trying editing an order on a Shopify store that has not been fulfilled yet. More specifically, we removed an existing line item, "restocked" the product, and updated the order. 

 

If I understood the Refund resource correctly (https://shopify.dev/api/admin-rest/2021-04/resources/refund#top), through the order/edit, our app should be refunding the amount for that removed line item.

 

However, we receive the following error:

"errors": {
"refund_line_items.quantity": [
"cannot refund more items than were purchased"
]
}

 

I would greatly appreciate any help in the correct direction.

Replies 0 (0)