I have an order with 3 different line items.
I need to refund 1 of those items (which is heavy and adds to the shipping price). Without this item I can reduce the price of the shipping by X.
How can I refund X? How can I automatically calculate how much I have to refund from the shipping? Does Shopify do that automatically?
The documentation example doesn't go too much in detail, it only states that you can send amount, but not how to figure out what the amount is.
Just refund the price of the item itself. Refunding a percentage of shipping? Who does that. I have never experience any e-commerce where you get shipping refunds. If I pay for shipping, I paid for something non-refundable.