You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to make an order level adjustment and then a new payment to process a refund for an order, the system will try to do two things
Create a 'refund transaction' with the amounts of the entire order
Create brand new transaction with the new order amount
However, order level adjustments are not taken into account when reporting the total order amount to Taxjar. This causes Taxjar to throw an error when trying to report the new amount.
As discussed in #178, this scenario is handled by allowing users to configure a custom discount_calculator which will let them determine how to handle splitting the discount among items for order level adjustments if desired.
However, as discovered in the testing of #139, order level adjustments will cause the creation of the "refund+new transaction" to fail silently and put your TaxJar reporting into a bad state (the order has been fully refunded, but a new transaction has not been created with the reduced amount)
To prevent this from happening, we should do the following.
If an order has order level adjustments, a custom discount calculator has not been configured, and the order is about to be posted to taxjar
a.) We should short circuit reporting and not post the full refund OR new reduced amount transaction (currently the full refund transaction is succeeding but the new reduced amount transaction is failing)
b.) We should display an error message to the user notifying them that the order was not reported to TaxJar
c.) We should add documentation describing how and why to use the discount_calculator option
d.) We should display a link to the documentation so they can learn how to handle order level adjustments if desired.
The text was updated successfully, but these errors were encountered:
Noah-Silvera
changed the title
Display error message if refund attempted with an order level adjustment
Don't refund orders with order level adjustments
Mar 21, 2022
One question that still remains in this ticket is how do we determine that someone isn't already handling order level adjustments? Maybe comparing the new line item totals to the order amount and seeing if they don't match? Because that is the underlying problem which causes the TaxJar API to return an error.
Noah-Silvera
changed the title
Don't refund orders with order level adjustments
Don't refund orders with unaccounted for order level adjustments
Mar 21, 2022
Taken from #178
As discussed in #178, this scenario is handled by allowing users to configure a custom
discount_calculator
which will let them determine how to handle splitting the discount among items for order level adjustments if desired.However, as discovered in the testing of #139, order level adjustments will cause the creation of the "refund+new transaction" to fail silently and put your TaxJar reporting into a bad state (the order has been fully refunded, but a new transaction has not been created with the reduced amount)
To prevent this from happening, we should do the following.
a.) We should short circuit reporting and not post the full refund OR new reduced amount transaction (currently the full refund transaction is succeeding but the new reduced amount transaction is failing)
b.) We should display an error message to the user notifying them that the order was not reported to TaxJar
c.) We should add documentation describing how and why to use the
discount_calculator
optiond.) We should display a link to the documentation so they can learn how to handle order level adjustments if desired.
The text was updated successfully, but these errors were encountered: