Taxes

The taxes folder contains definitions of all taxes and how they apply. When a peril is priced, every defined tax calculation is run against it. The gross tax on a policy represents the sum of all taxes across all of its perils.

  • [productName]/

    • policy/

      • taxes/

        • taxes.json

        • [taxName1].premium.liquid

        • [taxName2].premium.liquid

Tax Configuration

The taxes.json file lists all of the taxes applicable to the policy, as well as their display names.

{
  "taxes": [
    {
      "name": "sales",
      "displayName": "Sales Tax"
    }
  ]
}

Tax Calculation

Every tax must have an associated [tax_name].premium.liquid file, which has access to the same data object as premium calculations. At the end of a calculation, use the filter set_peril_tax to store the result onto the peril.

{{ data.peril_characteristics.premium | times: 0.0925 | set_peril_tax }}