Suppose a customer placed an order as follows:
- Product A - 1 unit - total $10 + tax
- Product B - 2 units - total $50 + tax
- Product C - 1 unit - total $40 + tax
The total payment with taxes was $120.
Later, the customer requested to cancel and refund 1 unit of Product B, which would normally result in a $25 + tax refund. However, I’m applying a 30% restocking fee, so the actual refund amount should be $17.5 + tax.
When using the API to calculate the refund, I can only define the line item and quantity. After that, I directly create the refund based on the calculation. How can I specify that the refund should be $17.5 instead of the full $25?