Credit Note Template Variables Documentation
This document provides a comprehensive guide to all credit note template system variables, which can be used to create custom credit note templates.
Please refer to the zenskar default template in your sandbox account for their usage.
Basic Credit Note Information
Header Information
-
{{logo}}- Organization's logo URL -
{{zenskar_redirect_url}}- Zenskar redirect URL -
{{zenskar_logo}}- Zenskar logo URLCredit Note Information -
{{credit_note.credit_note_number}}- Credit note number -
{{credit_note.date}}- Date when the credit note was issued -
{{credit_note.amount}}- Total credit note amount (formatted with currency) -
{{credit_note.remarks}}- Reason for the credit note -
{{credit_note.pre_tax_amount}}- Amount before tax (if applicable) -
{{credit_note.tax}}- Tax amount (if applicable) -
{{credit_note.invoice_number}}- Original invoice number against which credit note was issued -
{{credit_note.invoice_date}}- Date of the original invoiceCustomer Information -
{{customer.name}}- Customer's name -
{{customer.email}}- Customer's email address -
{{customer.address}}- Customer's billing address -
{{customer.ship_to_address}}- Customer's shipping address (if different from billing) -
{{customer.invoice_recipients}}- List of invoice recipients -
{{customer.tax_id}}- Customer's tax ID (if available) -
{{customer.custom_data}}- Any custom data associated with the customer -
{{customer.external_id}}- Customer's external ID -
{{customer.id}}- Customer's internal IDSeller Information -
{{seller.name}}- Seller's name -
{{seller.address}}- Seller's address -
{{seller.tax_config}}- Seller's tax configuration
Custom Attributes
Custom attributes which are set up for modules can be accessed in the template. The following are available in invoice template currently
-
Customer
Using{{customer.custom_data.<custom attribute keyname}}Usage ExamplesBasic Credit Note Display<div class="credit-note-header"> <h1>Credit Note</h1> <div class="credit-note-details"> <p>Credit Note Number: {{credit_note.credit_note_number}}</p> <p>Date: {{credit_note.date}}</p> <p>Amount: {{credit_note.amount}}</p> </div> </div>Credit Note with Tax Information<table> <tr> <td>Pre-tax Amount:</td> <td>{{credit_note.pre_tax_amount}}</td> </tr> {{#credit_note.tax}} <tr> <td>Tax:</td> <td>{{credit_note.tax}}</td> </tr> {{/credit_note.tax}} <tr> <td>Total Amount:</td> <td>{{credit_note.amount}}</td> </tr> </table>Customer and Seller Information<div class="party-info"> <div class="customer"> <h3>Bill To</h3> <p>{{customer.name}}</p> <p>{{customer.address}}</p> <p>Email: {{customer.email}}</p> </div> <div class="seller"> <h3>Bill From</h3> <p>{{seller.name}}</p> <p>{{seller.address}}</p> </div> </div>Original Invoice Reference<div class="invoice-reference"> <p>Credit Note Issued Against Invoice: {{credit_note.invoice_number}}</p> <p>Invoice Date: {{credit_note.invoice_date}}</p> </div>Notes
- All currency values are automatically formatted according to the specified currency.
- Dates are formatted according to the standard date format: "MMM DD, YYYY"
- Boolean values can be used with Mustache's conditional syntax:
{{#variable}}...{{/variable}} - Arrays can be iterated using Mustache's iteration syntax:
{{#array}}...{{/array}} - Some variables may be optional and should be checked for existence before use
- The credit note template includes invoice-related variables, but does not include payment receipt variables
- Tax information is optional and should be checked for existence before display
- Pre-tax amount is optional and falls back to the total amount if not available
Updated about 4 hours ago
