How Refunds affect the Order's current total price and current subtotal price

Hi

We saw a case where, when refunding an order using Shopify Admin, the order fields current_total_price and current_subtotal_price are being updated according to the refund being.
However, in other cases we see the mentioned fields not being changed at all.

Can someone please clarify the behavior? How can we determine the revisited totals in case these fields aren’t being updated?

Hey @guy_riseai :waving_hand:

Refunds/order edits can affect the current_toal_price and current_subtotal_price a bit differently, which is my thinking in terms of what you may have seen there in your examples.

When an item is removed from an order through the order edit function rather than the “refund” function, it’s not processed in the same way as a refund/return, so it doesn’t result in a reduction of the order’s current_total_price/subtotal price.

If this isn’t what you’re seeing on your end though, just let me know here along with an example for each order where you’re seeing the differing behaviour and I can for sure take a look on the backend on my end here to see if we can determine what’s happening.

Hope this helps - let me know if I can clarify anything on my end here!

Hi @Alan_G :slight_smile:
Thank you for the reply!

Some context:
I subscribed to refunds/create, where upon a new refund, the relevant Order is retrieved, and some actions are being processed using the Order’s current_total_price/subtotal price.

The behavior we encounter is that although refund/create was received on our end, the mentioned order fields contain the original total price and not the up to date values.
I have a particular example where the order’s original total price is 128, all of the items were refunded, and the current total price is still 128 (not 0 as expected).

This wasn’t reproduced on our test stores and only occurred on real time, so in terms of sharing particular information for investigation let me know if there’s a private channel we can use.

Thanks!

Hey again @guy_riseai - no worries! That does sound like a different issue than the one we’d regularly see which causes a bit of confusion (the order edit vs “refund” discrepancies).

If you have the Order ID and the Shop ID (not the myshopify.com URL) and can share it here in the thread, I can definitely take a closer look into this for you for sure. If you’ve just got the myshopify.com URL and the order ID though, feel free to DM them my way and I can take a look that way too so we keep that info a bit more private.

Hey @Alan_G sharing the mentioned IDs

Shop ID: 52016414892
Order ID: 6522608320684

1 Like

Hey @guy_riseai - thanks for waiting on me here - I was able to touch base with our devs on this.

They confirmed that in the example there (order ID 6522608320684), this looks to be expected behaviour.

I can’t share too much publicly here, but for reference, in that order, the reason why the current_subtotal_price isn’t updating, is because the line item is still on the order.

During the refund process, it looks like a refund was processed without entering a quantity to return for the line items on the refund page (where the line items are still showing as unfulfilled) If the items were removed during the refund then they would show as “removed” rather than still awaiting fulfillment.

Since there are still technically line items present on the order with price values, Shopify still considers there to be a subtotal price. If the line items were removed from the order during the refund process, the subtotal price would reflect the refund.

Hope this helps explain things - let me know if I can clarify anything more on our end here.

Thanks @Alan_G! This is very helpful

Can you help me instruct the Merchant how to correctly set the mentioned values?
That is, what they did vs what they should do to get the line item removed?

No worries @guy_riseai! If they’re setting up a refund through the admin, they’d need to include the line item in the refund rather than just returning the funds like this (where it says 1/1 in the screenshot):

This should make it so that the subtotal price reflects the refunded amount, since there would no longer be any inventory assigned to the order.