We work with multiple webshops via the Api for our customers, and noticed a difference which we could not replicate.
On our development shop, we can create refunds via the backend. If one puts an amount in the REFUND AMOUNT - Bank Deposit field (at the right in the summary), the api will show you this as a Order Adjustment of type refund_discrepancy. As far as I can tell, there is no other way to get such a line on the refund.
Some of our customers have refunds which contain 2 refund_discrepancy lines.
One of them has a positive amount and the other a negative amount.
The only thing I noticed was that we use manual payment process and they use a payment provider.
(we use a manual method because it’s for development and we do not have a psp nor do we expect a payment, we just need the info from the Api).
I was wondering why this happend so we can make an educated adjustment to deal with this additional line.
I just noticed that there are 2 slightly different situations.
The order total price is added as a positive and a negative order_adjustments lineon top of the refund_line_items
Some sort of discount is given and are added as a positive and a negative order_adjustments lines
When I try to refund an order, with manual payment, I only received one order_adjustments of kind refund_discrepancy, and was unable to get the second one.
On top op that I only could get a line refunded and have a refund_discrepancy line if it was a partial refund and change the total refund amount.
So I don’t understand how the situations above can happen.
Hopefully one of you can tell me, how this works as the documentation couldn’t help me.
Below you see how we receive the data (situation 1 on the left, 2 on the right):
I believe the second adjustment occurs when a partial refund has been provided, or it could be related to multi-currency. Try making a partial refund to see if that causes a 2nd adjustment to show up. If that doesn’t explain it, please provide order_id examples from your test store and client and I can dig in further.
I tried to make partial refunds. This did not result into multiple refund_discrepancy on the same refund.
I don’t know if the clients use the shopify payments app or another multi-currency app.
Order Ids from 2 clients with multiple refund_discrepancy lines on a single refund
OrderId: 2345941008473 RefundId: 657860722777
OrderId: 2571075059790 RefundId: 674344992846
As far as I could tell, it had something to do with the state of the refunded amount as the following screenshot corresponds with the lines on order 2345941008473: