Change to the way excise tax is collected on Shopify

Previously on Shopify, we used to have an Excise Tax product that costed 1 cent, and to get the correct amount of taxes on the cart, we would change the quantity of that product on the cart to get the desired result.

Our new approach is to instead make a one time variant of the excise tax product that is priced exactly as we need it, and then delete that variant once the order is completed.

This solves two things:

  1. Much easier for vendors/consumers to read and understand, leading to less questions
  2. Allows the tax label to show up on the order receipt (Which is required in Ohio and maybe some other states)

Heres how it works:

Customer adds item that needs tax to the cart. Once they fill out shipping location, we calculate the proper taxes, and then create a variant of the "Excise Tax" product, that has two properties: The title (MN Excise Tax) and a cart id. The cart id is used for internal purposes, just to differentiate user sessions. Once the order is completed, we automatically delete that variant of the excise tax product automatically. We also delete any variants that were created over 24 hours ago, which ensures that we delete variants for any customers that did not ever complete checkout. The purpose of deletion is to not accidentally go over Shopify variant count limit.

Here is how this looks on checkout
Heres how this looks on an order confirmation email sent to customer

Extra info:

  1. The migration to this new format does not require any human intervention, as the excise tax product and its variants are all created automatically, which means we will have a smooth transition to this new version of tax collection from how it was previously collected
  2. If a customer happens to leave a cart open for 24 hours which means the variant would be auto deleted, then it simply brings them back to the cart page and immediately recreates a new variant, basically meaning that this will not result in a new tax bypass loophole