I would appreciate guidance on the correct way to handle taxes when issuing refunds/partial refunds using the Admin GraphQL API.
My use case is the following:
-
A customer places an order with taxable products.
-
When issuing a refund, I need to apply a deduction (for example an admin or restocking fee).
-
I want to ensure that tax is refunded correctly and in compliance with Shopify’s tax logic.
More specifically, I would like clarification on:
-
Whether tax is calculated and refunded automatically by Shopify when refunding line items using
refundCreate(GraphQL), based only onlineItemIdandquantity. -
How deductions (such as admin fees) should be applied:
-
Should they be handled using
refundAdjustmentswithinrefundCreate? -
Or is there another recommended approach?
-
-
Whether tax calculations and refunds are handled at the line item (product) level or at the order level.
-
In a scenario where part of the product value is not refunded due to a deduction, how Shopify determines the correct tax amount to refund.
Example scenario:
-
Product price: $100
-
Tax: 10% ($10)
-
Deduction/admin fee: $20
-
Refunded product value: $80
In this case, I want to confirm the correct way to structure the refundCreate mutation so that Shopify automatically refunds the correct portion of tax, without me manually calculating or supplying tax values in my own system.
Any best practices or example workflows for this scenario would be very helpful.
Thank you in advance for your guidance.
Best regards,
Johanna