The issue at hand is that some refunds include mysterious “refund_discrepancy” items in the “order_adjustments” list.
This issue has been unanswered for at least 4 years, and Shopify does not seem to want to answer the question or help us developers out here. [1][2]
Well, it’s 2024, two years since the last time it was brought up in the forums, and it’s time to ask it again :).
What are these mysterious refund discrepancies? As various users have shared in the linked discussions, these “refund_discrepancy” items seem to be used for multiple things, such as:
- Adjusting for differences due to discounts
- Adjusting for differences due to refund being only a partial refund of the total order amount
- Canceled orders get them
- Sometimes, they show up twice in the order adjustments list, one with a positive value and one with the same value but negative, without indicating why there are two or why one is positive and one is negative.
What would be helpful to know is:
- What causes these to be created in refunds?
- Why are there sometimes two of them that cancel each other out in the same refund?
Without knowing all the reasons these are created, developers can’t account for these adjustments correctly in their integrations.
A couple examples (plenty more examples shared in the linked discussions):
Order 5567879381176
Simple order for a single item priced at $250 was canceled. Why does this refund have a refund discrepancy for $250. What is the purpose of this order adjustment?
Order 5671547240632
Customer forgot to apply a discount and requested the merchant apply it after placing the order. Merchant handled it by issuing a partial refund for the discount amount, which ended up being $40. The order has 2 refund discrepancies, one for $40 and one for -$40. What is the purpose of these order adjustments?
Shopify is clearly handling these discrepancies correctly on the order view. But as a developer, we’re missing some context in the API to be able to do the same.
[1] Unanswered from 2020: Multiple order adjustments of type: refund_discrepancy - Shopify Community
[2] Unanswered from 2022: Order API - Multiple Refund Order Adjustments of Type 'refund_discrepancy' - Shopify Community
[3] Another unanswered one from 2022: “refund_discrepancy kind of order_adjustment is getting created with same refund amount”