Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Refund Error: cannot refund more items than were purchased

Refund Error: cannot refund more items than were purchased

dsl3Jd
Shopify Partner
16 2 3

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.

Reply 1 (1)

approxhuman
Shopify Partner
9 2 3

Were you able to figure this out?

Developer, Indie hacker, Twitter: @approxhuman