-
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
[RFC] Support reporting #77
Comments
After further discussion and research, we've landed on some acceptance requirements for how this will work. According to the TaxJar documentation, we only need to push orders in certain cases.
We should only push orders if all the following are true... As long as an order has not been paid, we don't need to worry about pushing it to TaxJar, as no actual monetary transaction has been made yet sent - the client has not been charged yet. (We may want to confirm this with the TaxJar team - just to confirm it's ok that unpaid and unshipped orders on the system never get pushed to TaxJar). In order for an order to be paid and shipped, "order_recalculated" has to be fired at least once. This means we only need to hook into refunds being created, and orders being recalcalculated, and not worry about the Remaining questions:
cc: @nvandoorn |
Investigated with @forkata and learned a little bit more about how refunds work, and had some more thoughts on how we need to handle them to correctly report them to TaxJar. Some BackgroundWe learned in #86 that refunds are actually a negative delta of the amounts refunded from the original order. An order will have at most two transactions associated with it - an order transaction, which represents all the positive payments made towards the order towards what items, and a refund transaction that represents the store-credit/credit card refunds given back to a customer. Assumptions
Scenarios (all of these refer to actual financial transactions happening, which is the event TaxJar cares about)1. A user completes a payment for an order that doesn't exist in TaxJar
2. A user completes an additional payment for an order that does exist in TaxJar
3. A store issues a refund/store-credit for an orderThe refund/store-credit is attached to a reimbursementIn this scenario, we can determine exactly the line items, shipping, and sales tax amounts from pure solidus For example.....
The refund/store-credit is not attached to anythingIn this scenario, we cannot trust the values of the
To deal with this problem, we can use the original TaxJar transaction to determine the delta.
This seems like the only way we could accurately send the correct amounts that have been refunded for shipping/individual line items/total order to TaxJar. This is important, as taxes can be calculated differently for each of those items, so we need to report the correct amounts to TaxJar. cc: @jarednorman @nvandoorn does this sound like a reasonable approach for handling refunds, under the assumption we need to report accurate porportions for shipping/line-item-amounts/sales-tax? Questions for TaxJar
|
We had a meeting with TaxJar, and got these questions answered.
|
One follow up question we need to contact Ryan Lee about The suggested pattern for refunds is to refund the entire original transaction, and then to create a new transaction in taxjar with the reduced amount (the amended transaaction) For an amended transaction, do we want the date of it to be current date, (date the refund was issued) or the date in the past (date the order was originally fufilled). |
At this moment, this extension only calculates tax and does not report anything to TaxJar. This is a large feature that will require further decomposition.
The text was updated successfully, but these errors were encountered: