Skip to main content

Overview

This page documents every Mustache variable used in the invoice HTML template, organized by functional section, with its type and whether it is always present. For how Mustache syntax itself works ({{variable}}, sections, inverted sections) and the data type conventions used in the tables below, see the Templating guide.

1. Top-level configuration

1.1 Branding and assets

1.2 Invoice metadata

1.3 General information


2. Party information

2.1 Customer details

2.2 Seller details


3. Invoice summary section

Wrapper: {{#summary.show_invoice_summary}}...{{/summary.show_invoice_summary}} This optional section generates a separate summary page before the detailed invoice. Because a Mustache section extends the surrounding context rather than replacing it, every top-level variable documented elsewhere on this page is also available inside {{#summary.show_invoice_summary}}, for example {{logo}}, {{invoice_data.id}}, {{billing_duration}}, {{invoice_data.invoice_date}}, {{invoice_data.due_by}}, {{customer.name}}, {{{customer.address}}}, {{customer.email}}, {{customer.tax_id}}, {{seller.name}}, {{{seller.address}}}, and the {{#ach_details}} block. You don’t need to re-declare them under summary; only the fields below are unique to this section.

3.1 Summary metadata

3.2 Summary line items

Array: {{#summary.summary}}...{{/summary.summary}}
Zenskar inserts a page break immediately after this section, so when shown, the summary always renders on its own page ahead of the itemized invoice rather than sharing a page with it.

4. Document line items

Primary array: {{#document_lines}}...{{/document_lines}} Each line item represents a charge, fee, or adjustment on the invoice.

4.1 Basic line item properties

4.2 Common templating data

These properties exist within the templating_data object of each line item, regardless of pricing model.

5. Pricing models

Exactly one of the following wrapper sections is truthy for a given line item, based on the pricing model of the underlying charge.

5.1 Per-unit pricing

Wrapper: {{#templating_data.per-unit-pricing}}...{{/templating_data.per-unit-pricing}} Standard pricing where cost is quantity × unit price.

Quantity entries breakdown

Array: {{#templating_data.formatted_quantity_entries}}...{{/templating_data.formatted_quantity_entries}} Present when usage spans multiple periods or rates within the line item:

5.2 Package pricing

Wrapper: {{#templating_data.package-pricing}}...{{/templating_data.package-pricing}} Pricing based on predefined packages or bundles.

5.3 Volume pricing

Wrapper: {{#templating_data.volume-pricing}}...{{/templating_data.volume-pricing}} All units priced at the same rate, based on total volume.

5.4 Tiered pricing

Wrapper: {{#templating_data.tiered-pricing}}...{{/templating_data.tiered-pricing}} Different price rates apply to different quantity ranges.

Tier details

Array: {{#templating_data.tiers}}...{{/templating_data.tiers}}

5.5 Two-dimensional tiered pricing

Wrapper: {{#templating_data.2d-tiered-pricing}}...{{/templating_data.2d-tiered-pricing}} Pricing based on two dimensions, for example users × storage tiers.

Column tiers (current)

Array: {{#templating_data.column_tiers_v2}}...{{/templating_data.column_tiers_v2}}

Column tiers (legacy)

Array: {{#templating_data.column_tiers}}...{{/templating_data.column_tiers}} Present on older line items instead of column_tiers_v2, with the same fields under column_name rather than column_dimension:

5.6 Matrix pricing

Wrapper: {{#templating_data.matrix-pricing}}...{{/templating_data.matrix-pricing}} Pricing determined by the intersection of multiple dimensions.

5.7 Step pricing

Wrapper: {{#templating_data.step-pricing}}...{{/templating_data.step-pricing}} Flat fee pricing based on quantity ranges.

5.8 Percentage pricing

Wrapper: {{#templating_data.percent-pricing}}...{{/templating_data.percent-pricing}} Pricing calculated as a percentage of a base amount.

5.9 Seat-based pricing

Wrapper: {{#templating_data.seat-based-pricing}}...{{/templating_data.seat-based-pricing}} Pricing based on active seats or users, with prorated calculations.

Seat line items

Array: {{#templating_data.sub_line_items}}...{{/templating_data.sub_line_items}}

5.10 Custom pricing

Wrapper: {{#templating_data.custom-pricing}}...{{/templating_data.custom-pricing}} Custom pricing model with multiple dimensions.

Custom sub-line items

Array: {{#templating_data.sub_line_items}}...{{/templating_data.sub_line_items}}

5.11 Custom tiered pricing

Wrapper: {{#templating_data.custom_tiered_pricing}}...{{/templating_data.custom_tiered_pricing}} A custom implementation of tiered pricing.

5.12 Free units

Wrapper: {{#templating_data.free-units}}...{{/templating_data.free-units}} Pricing with an allocation of free units before charges apply.

5.13 Deduct entitlement

Wrapper: {{#templating_data.deduct-entitlement}}...{{/templating_data.deduct-entitlement}} Charges based on consumption from a prepaid balance or entitlement.

5.14 Minimum amount overages

Wrapper: {{#templating_data.minimum-amount-overages}}...{{/templating_data.minimum-amount-overages}} Charges applied when a minimum commitment is not met.

5.15 Subscription charges

Wrapper: {{#templating_data.subscription}}...{{/templating_data.subscription}} Fixed recurring subscription fees.

5.16 Subscription with proration

Wrapper: {{#templating_data.subscription-with-proration}}...{{/templating_data.subscription-with-proration}} Prorated subscription charges for partial periods.

5.17 Prorated fixed charge

Wrapper: {{#templating_data.prorated-fixed-charge}}...{{/templating_data.prorated-fixed-charge}} Fixed charges prorated for partial billing periods.

5.18 Custom line item

Wrapper: {{#templating_data.custom_line_item_data}}...{{/templating_data.custom_line_item_data}} Arbitrary custom charges.

5.19 Maximum pricing

Wrapper: {{#templating_data.max}}...{{/templating_data.max}} Pricing capped at a maximum amount.

6. Adjustments (discounts, taxes, surcharges)

These sections apply within a single line item, as opposed to the invoice-level adjustments in section 7.

6.1 Discount line items

Wrapper: {{#templating_data.discount}}...{{/templating_data.discount}}

6.2 Tax line items

Wrapper: {{#templating_data.tax}}...{{/templating_data.tax}}

6.3 Surcharge line items

Wrapper: {{#templating_data.surcharge_data}}...{{/templating_data.surcharge_data}}

7. Invoice-level calculations

7.1 Discount summary

Wrapper: {{#discount_data.discount_data}}...{{/discount_data.discount_data}} An invoice-level discount applied after line items.

7.2 Surcharge summary

Wrapper: {{#surcharge_data.surcharge_data}}...{{/surcharge_data.surcharge_data}} An invoice-level surcharge applied after line items.

7.3 Tax summary

Wrapper: {{#tax_data_new.tax_data}}...{{/tax_data_new.tax_data}} An invoice-level tax calculation with a breakdown by tax item.

Tax items

Array: {{#tax_data_new.taxes}}...{{/tax_data_new.taxes}}

7.4 Avalara tax (legacy)

Wrapper: {{#avalara_tax_data.formatted_amount_after_tax}}...{{/avalara_tax_data.formatted_amount_after_tax}} Legacy Avalara tax integration, superseded by section 7.3 on newer invoices.

7.5 Custom totals

Array: {{#custom_data}}...{{/custom_data}} Additional custom line items shown in the totals section.

7.6 Customer balance

Wrapper: {{#customer_balance.balance_is_non_zero}}...{{/customer_balance.balance_is_non_zero}} Application of an existing customer credit balance.

8. Payment information

8.1 ACH/wire transfer details

Wrapper: {{#ach_details}}...{{/ach_details}} Bank account information for direct payment.

8.2 Custom payment instructions

Wrapper: {{#payment_instructions}}...{{/payment_instructions}} An alternative payment instruction format, used when ACH details aren’t provided.

Payment details list

Array: {{#details_list}}...{{/details_list}}

9. Invoice notes

Wrapper: {{#invoice_note}}...{{/invoice_note}} Optional notes or terms displayed at the bottom of the invoice.