Zamp for Shopware: Order Processing

Order Processing

How Tax Calculation Works

The Zamp Tax plugin processes orders through the following steps:

  1. When an order is initiated, the plugin checks if tax calculations are enabled
  2. The plugin validates the shipping address is in a configured taxable state
  3. Customer group tax exemption status is evaluated
  4. Product tax codes are collected for each line item

Real-time Tax Computation

Tax rates are calculated in real-time during checkout:

  1. Cart contents are sent to Zamp API including:
    • Line items with quantities and amounts
    • Product tax codes
    • Shipping address
    • Customer exemption status
  2. 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:

  1. Pre-transaction validation:
    • Verify API connectivity
    • Check address is in taxable state
    • Validate product tax codes
  2. Transaction processing:
    • Calculate tax rates
    • Apply tax to line items
    • Generate tax breakdown
  3. 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.