Order Processing
How Tax Calculation Works
The Zamp Tax plugin processes orders through the following steps:
When an order is initiated, the plugin checks if tax calculations are enabled
The plugin validates the shipping address is in a configured taxable state
Customer group tax exemption status is evaluated
Product tax codes are collected for each line item
Real-time Tax Computation
Tax rates are calculated in real-time during checkout:
Cart contents are sent to Zamp API including:
Line items with quantities and amounts
Product tax codes
Shipping address
Customer exemption status
Zamp API returns:
Itemized tax calculations
Applied tax rates
Total tax amount
Note: If tax calculation fails, the system will default to 0% tax rate.
Order Transaction Flow
The transaction process follows this sequence:
Pre-transaction validation:
Verify API connectivity
Check address is in taxable state
Validate product tax codes
Transaction processing:
Calculate tax rates
Apply tax to line items
Generate tax breakdown
Post-transaction actions:
Log transaction details
Store tax calculations
Queue for reporting
Tax Rate Application
Tax rates are applied according to these rules:
Line item tax calculation:
Individual tax rates per product
Based on product tax code
Considers shipping location
Shipping tax calculation:
Separate shipping tax rates
Based on delivery address
Follows state regulations
Exemption handling:
Zero rate for exempt customers
Partial exemptions where applicable
Documentation requirements
Important: Tax calculations require valid product tax codes and customer address information to function correctly.