-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix invalid refund endpoint call #86
Conversation
Before updating the changelog, we should release the current changes we have on TaxJar, as they are currently non-breaking. This is a breaking change we should do a separate version release for. |
I found a conflicting KB article posted in 2021 that says we should use positive values positing a refund :( Will need to reach out to the taxjar team to check which pattern is actually the correct pattern https://support.taxjar.com/article/351-handling-refunds-with-api |
Thanks @Noah-Silvera! Should I start a thread with the TaxJar folks over email? |
It's probably worth it just to be sure! I found one more piece of information that strengthens the case for negative values In the taxjar API docs for create order, it says this And in the taxjar API docs for create refund, it says this I am 80% confident the KB article I linked is wrong, and would be comfortable merging this for now, but waiting to release this change until we have gotten 100% confidence from them that we should use negative values. |
This variable is only used in one spec, so it should be moved into the spec context.
Refunds in taxjar are transactions that have a negative delta against the original order. Our API was incorrectly using TaxJar's refund API by calling it with positive numbers, which would represent the customer getting paid more, not getting refunded.
Co-authored-by: Noah Silvera <[email protected]>
907cf0b
to
e38fec0
Compare
We are deprecating this refund endpoint in favour of one that refunds based on a taxjar transaction and not a reimbursement, so we can close this PR. |
What is the goal of this PR?
The refund endpoint is meant to be used to post a transaction that represents the delta of changes to the order. This means that the amounts for the order total and sales tax passed should be negative.
An example can be found in the taxjar API
https://developers.taxjar.com/api/reference/?shell#post-create-a-refund-transaction
How do you manually test these changes? (if applicable)
create_refund_for
endpoint on the extensionMerge Checklist