Mysterious "refund_discrepancy" order adjustments

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:

  1. What causes these to be created in refunds?
  2. 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”

1 Like

Hi Dylanla,

It’s possible these “refund_discrepancy” items are related to how refunds are processed asynchronously, especially when using third-party payment methods like Afterpay and PayPal. This can result in discrepancies in the reporting.

There are generally two scenarios where you will see refund discrepancies:

  1. When a refund is issued for an amount that is not equal to the “expected” amount based on the line items selected. For example, if you refund a $10 item, but only issue a $7 refund amount, we capture the remaining $3 in sales as a refund discrepancy. Essentially there was some money withheld from the refund, but we do not know why, so this refund discrepancy helps us balance sales & order transaction records. If you want to know what the “expected” amount for a certain refund is you can use the order.suggestedRefund query before issuing the refund.
  2. As @Liam-Shopify said, you will see refund discrepancies for refunds that use asynchronous payment gateways. This is the scenario where you will get two refund discrepancies for the same amount, one positive and one negative. Again it is used to balance the sales and order transaction records while the payment is in a pending state.
1 Like