Refund when changing line items

Topic summary

Main issue: A Shopify app lets customers either cancel orders or swap products, but price adjustments from product swaps are handled inconsistently versus refunds.

Details:

  • Cancel flow uses the “calculate refund” API route as per docs.
  • Swap flow uses an “order edit” (modifying line items after purchase). When the new item is cheaper, Shopify Admin shows “Refund owed.”
  • The refund API requires specifying which line item to refund, which doesn’t fit a swap scenario where the customer shouldn’t receive a refund for one item and then pay separately for another.

Key terms:

  • Order edit: Changing line items in an existing order.
  • Calculate refund route: API endpoint to compute refund amounts.
  • Refund owed: Admin indicator that a net refund is due after changes.

Request: Guidance or resources for invoicing/netting adjustments for order changes so customers see a single net charge or refund.

Status: Unresolved; no documentation found by the poster; seeking advice.

Summarized with AI on January 3. AI used: gpt-5.

Hi Community.

I am a little baffled by some behaviour I encountered:

I have a little app, that lets the customer either change a product or cancel the order completely from the frontend.

To cancel, I use the calculate refund route as the docs say.
To switch a product, I create an order edit. The edit goes through, but the resulting price difference is treated inconsistently with the refund. When the new price is lower, I see the difference in the shopify admin as “Refund owed”.
when calculating a refund, I need to specify which item to refund, but I don’t want the customer to get a refund for one and have to make a payment for the other.

Anyone know how to tackle this? I didn’t find a resource for order change invoicing or something.

Cheers

Theo