Refund Line Item - When the refund value is changed, what Shopify provides to Cin7 Core is causing issues with the line item refund value

Hi Guys,

I’m not sure what the solution is to this issue?

In Shopify, when we;

  • Complete a refund, where we have changed/adjusted the value of the refund
  • IE → The customer paid $56.79 for the item
  • IE → We select the item/s and change the refund value to $0
  • What Shopify seems to provide Cin7 is the following;

  • In the above instance, it provides the original value for the item’s refund value, not $0.
  • This means Cin7 captures the item line value and inputs $56.79 as the refund owing in their credit note tab.
  • But in Shopify, we changed the refund amount to $0

What is the solution to this issue going forward? Thank you.

Hi @ChrisP

Is it convenient to provide you with the Shopify API version for use?

  1. The version is 2025-10
  2. This order contained 4 items and 1 of them was returned
  3. We changed the refund amount to $0, restocked the item, then created a new order for the customer for the same item in a different size and applied a 100% discount (so we didn’t need to issue a refund for the original order and then collect a new payment for the second order)

If you look at the data Shopify is providing, it didn’t put the line item refund value at $0, but the original unit price. What solutions do you recommend to solve it?

Hi @ChrisP

There is a transactions data field. When it is an empty array [ ], it indicates a refund amount of zero. I’m not sure if you can start with this.

Hey @ChrisP! @kyle_liu is on the right track - the transactions array is what you need to check for the actual refunded amount.

The confusion here is that refund_line_items[].subtotal represents the item value being returned (for inventory/restocking purposes), not the actual money refunded. In your case, you restocked the item (so the line item appears with its full $56.79 value) but adjusted the financial refund to $0.

The Refund object docs explain this: “The existence of a Refund object doesn’t guarantee that the money has been returned to the customer. The actual financial processing happens through associated OrderTransaction objects.”

So to calculate the correct credit amount, use the totalRefundedSet field instead of refund_line_items[].subtotal. This field gives you the total amount across all transactions - it’ll return "0.0" when no money was refunded (empty transactions array) and the actual refunded amount when transactions exist.

Kyle’s screenshots show:

  • Refund 0: transactions: []totalRefundedSet would return $0

  • Refund 1: transactions: [{ amount: "1.00" }]totalRefundedSet would return $1.00

Let me know if this helps or you need further clarification!

Hi Donal,

Thanks for the reply, please bear with me as I’m not a programmer, but as I understand it;

  • Transactions = Is the actual “refund” transaction
  • Refund Line Items = Is the individual product line item data such as price, quantity etc

When you say “refund_line_items[].subtotal represents the item value being returned (for inventory/restocking purposes)”…

  • For what inventory / restocking purposes is the $56.79 being used for in Shopify in this situation? Why wouldn’t it simple be $0?
  • Isn’t the inventory value based off the COG value and not what the customer paid for the item, so I’m struggling to understand why it would have $56.79 in the data.

Basically there are two things going on here;

Cin7 credit tab note records

  • The Product Line item, its quantity, its price → To know what is owed to the customer
  • The Refund Tranaction → This can take usually a few days for the transaction to be completed within Shopify and it will auto-capture/record it.

The Product Line and Actual Refund Transaction are two different tasks. Because the data in the Product Line is showing $56.79 that is what is being captured, but then it captures the $0 refund payment, so it appears as those the Credit Note tab is outstanding / waiting for a payment to the customer.

Hey @ChrisP, good question - the $56.79 in refund_line_items[].subtotal is there because it tracks what item value is moving through the refund process, not the financial amount. Think of it as “this line item is being processed in a refund” rather than “this much money is being refunded.”

The reason it’s the selling price ($56.79) rather than $0 is because Shopify’s orders system tracks inventory at the retail value (what the customer paid), not at cost of goods. So when an item moves through a refund - whether it’s being restocked, removed from the order, or returned - the system logs the retail value of that movement in refund_line_items[].subtotal.

The actual financial refund amount lives entirely in the transactions array and totalRefundedSet. When you restock an item but refund $0, you get:

  • refund_line_items[].subtotal = $56.79 (item is being processed)

  • transactions = [] (no money is moving)

  • totalRefundedSet.shopMoney.amount = "0.0" (summary of actual refund)

For Cin7’s credit note integration, you’d want to pull from totalRefundedSet rather than summing the subtotal values. That field gives the actual money refunded across all transactions and handles the empty transactions array case correctly (returns “0.0”).

Hope this clarifies things, let me know if not!