Multiple order adjustments of type: refund_discrepancy

Pjager
Visitor
3 0 0

Hi there,

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. 

Replies 3 (3)

Pjager
Visitor
3 0 0

I just noticed that there are 2 slightly different situations.
1) The order total price is added as a positive and a negative order_adjustments lineon top of the refund_line_items

2) 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):
                                                     
Naamloos.png    Pjager_1-1600327710304.png

 

 

 

_JB
Shopify Staff
836 100 222

Hey @Pjager,

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.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Pjager
Visitor
3 0 0

Hi @_JB ,

Thank you for your reply.

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:

image (9).png

And a similiar thing can be seen here on order 2571075059790 :

Screenshot_13.png

An test order on our dev site
* OrderId: 2783216861256 and 2783330107464

and many more where I tested:
* different payment method (all manual), (2783289573448)
* tries restocking/not restocking, (2783289573448)
* custom article refunds, (2783294488648)
* partial refunds,  (2783330107464)
* refunding more than the order amount, (did not work)
* refunding an item with an additional fee 
* refunding a discounted item (2783309168712)
* refunding a negative amount, (did not work)

If you need any other information, please let me know