How do I know what to set a excise tax rule's transactionType to?
How do I know what to set a rule's transactionType to?
- a
retailrule → applies only if the transaction/order'stransactionTypeisretail. - a
wholesalerule → applies only if the transaction/order'stransactionTypeiswholesale. bothor unspecified → applies to all transaction types. A tax rule only filters by type if it explicitly setstransactionType; otherwise it applies to orders/transactions.
How is the transactionType set on the order?
By default, every transaction is treated as retail unless you set a different transactionType on the order/transaction or you set the client configuration's exciseTax.defaultTransactionType to a different value. So, to make wholesale-only rules work, you must set transactionLine.transactionType = ‘wholesale’ (or set the API default) before calculating taxes.