Sales receipt template
Use our sample template for creating sales receipts.
You can view the sales receipt template in the InStore Center by creating a new Receipt Template set that includes this sales receipt template, then editing it.
Template
1. `{{logo 32 32}}`2. `{align:center}`3. `{{location.description}}`4. `{{location.address_line_1}}{{#if location.address_line_2}}\n{{location.address_line_2}}{{/if}}`5. `{{location.city}}`6. `{{location.state}}`7. `{{location.postal_code}}`8. `{{location.telephone_number}}`9. `{{if reprint}}`10. `{align:center}`11.12. `^^^**_Reprinted Receipt_**`13.14. `{{/if}}`15. `{align:left}`16. `|Date: |{{timestamp_formatted}}`17. `|Workstation pipe: |{{session.workstation_id}}`18. `|Cashier: |{{user_id}}`19. `|Transaction #: |{{order_number}}`20. `|VAT ID: |{{tax_id}}`21. `{align:center}`22.23. `{{barcode order_number}}`24.25. `{{#each line_items}}`26. `{width:30,12,_; align:left}`27. `|{{truncate description 28}} | {{formatCurrency extended_price}}| {{truncate tax_code 3}}`28. `{width:16,20,4; align:right}`29. `{{#if quantity}}{{quantity}}{{else}}1{{/if}} @ {{formatCurrency price}}`30. `{{#each price_modifiers}}`31. `| {{description}} | ({{formatCurrency amount}})|`32. `{{/each}}`33. `{width:16,20,4; align:right}`34. `{{#each attributes}}`35. `| {{label}}: | {{value}}|`36. `{{/each}}`37. `{{/each}}`38. `{width:\_; align:center}`39. `---`40. `{width:20,\*; align:left}`41. `^^^Total: | ^^^{{formatCurrency total}}`42.43. `{width:20,_; align:right}`44. `{{#each payments}}`45. `|^{{type}}: | {{formatCurrency amount}}`46. `{{#if charge_card}}`47. `{{#if charge_card.additional_data}}`48. `{{#if charge_card.additional_data.receiptData}}`49. `{width:16,20; align:right}`50. `|Card: | {{charge_card.additional_data.receiptData.pan}}`51. `|PAN seq: | {{charge_card.additional_data.receiptData.panSeq}}`52. `|Pref. name: | {{charge_card.additional_data.receiptData.preferredName}}`53. `|Card type: | {{charge_card.additional_data.receiptData.cardType}}`54. `|Payment method: | {{charge_card.additional_data.receiptData.paymentMethod}}`55. `|Payment variant: | {{charge_card.additional_data.receiptData.paymentMethodVariant}}`56. `|Entry mode: | {{charge_card.additional_data.receiptData.posEntryMode}}`57. `|AID: | {{charge_card.additional_data.receiptData.aid}}`58. `|MID: | {{charge_card.additional_data.receiptData.mid}}`59. `|TID: | {{charge_card.additional_data.receiptData.tid}}`60. `|PTID: | {{charge_card.additional_data.receiptData.ptid}}`61. `|Auth. code: | {{charge_card.additional_data.receiptData.authCode}}`62. `|Response code: | {{charge_card.authorization_response_code}}`63. `|Tender: | {{charge_card.additional_data.receiptData.txRef}}`64. `|Reference: | {{charge_card.additional_data.receiptData.mref}}`65. `|Type: | {{charge_card.additional_data.receiptData.txtype}}`66. `|^TOTAL: | {{formatCurrency charge_card.additional_data.receiptData.totalAmount}}`67. `{{/if}}{{else}}`68. `{width:24,20; align:right}`69. `|card number: | {{charge_card.last4}}`70. `|account type: | {{charge_card.brand}}/{{charge_card.account_type}}`71. `|application name: | {{charge_card.application_preferred_name}}`72. `|AID: | {{charge_card.dedicated_file_name}}`73. `|ARC: | {{authorization_response_code}}`74. `{{/if}}{{/if}}`75. `{{#if gift_card}}`76. `{width:16,20; align:right}`77. `|card number: | _{{gift_card.last4}}`78. `|card type: | {{gift_card.type}}`79. `{{/if}}`80. `{{#if wallet}}`81. `{width:16,20; align:right}`82. `method: {{wallet.method}}`83. `|transaction id: | {{wallet.transaction_id}}`84. `|merchant id: | {{wallet.merchant_id}}`85. `|terminal id: | {{wallet.terminal_id}}`86. `{{/if}}`87. `{{/each}}`88. `{width:_; align:center}`89. `^VAT Summary`90. `{width:10,12,12,\_}`91. `Code | Rate| Net| VAT`92. `{{#each tax_summary}}`93. `{{code}} | {{tax_rate}}| {{formatCurrency total_net}}| {{formatCurrency total_tax}}`94. `{{/each}}`95. `---`96. `{{#if reprint}}`97. `{width:\*; align:center}`98. `^^^**_ Reprinted Receipt _**`99.100. `{{/if}}`101. `{width:\*; align:center}`102. `^^Thank you! Come again!`
Line number descriptions
Location and address data is pulled from fields on the Location Information page in the InStore Center.
Line number | Source and description of field |
---|---|
1 | Prints the logo image that the you previously injected into the physical printer memory at position 32 32 in the printer. See your printer manufacturer documentation for logo injection and printing capabilities for the particular make and model. |
2 | Aligns the following text to the center of the page. |
3 | Inserts the location name from the Location Name field. |
4 | Inserts the first line of the address from the Address Line 1 field. Also inserts Address Line 2 if it contains text. |
5 | Inserts the town or city from the City/Town field. |
6 | Inserts the state or county from the State or Province/County field. |
7 | Inserts the post code from the Postal Code field. |
8 | Inserts the phone number from the Telephone Number field. |
9 | Sets a condition for data within the if tags; include only if this is a reprinted receipt. |
10 | Aligns the following text to the center of the page. |
11 | Blank line, which renders as white space (linefeed) on the receipt. |
12 | Specifies the text that prints only when the if condition is met; uses carets for level three emphasis and double asterisks for italics. |
13 | Blank line, which renders as white space (linefeed) on the receipt. |
14 | Ends the if condition for reprinted receipts. |
15 | Aligns the following text to the left of the page. |
16 | Creates a table that formats this line and those that follow into two columns with plain-language text as labels in the left column. Inserts timestamp_formatted from the server that stores the location's database and uses database-determined formatting. |
17 | Inserts the workstation_id for the workstation where the transaction was completed. |
18 | Inserts the user_id_ of the user who was logged in when the sale was tendered. |
19 | Inserts the order_number that was assigned to this transaction by InStore; this is also visible on Search Transactions page of the InStore Center. |
20 | Inserts the variable originally entered on the TaxId field on the General tab of the Environment page of the InStore Center, unless an overriding Tax ID was provided on the Location Information page in the InStore Center. |
21 | Aligns the following text to the center of the page. |
22 | Blank line, which renders as white space (linefeed) on the receipt. |
23 | Inserts the barcode representation of the {{order_number}} . |
24 | Blank line, which renders as white space (linefeed) on the receipt. |
25 | Starts a subsection and specifies that each of the line items listed will be formatted as follows. |
26 | Defines the width of each column in the next table to be created and aligns the text to the left. Column 1 is 30 characters wide, column 2 is 12 characters wide, and column 3 uses the remaining space (* ). |
27 | Creates a table for each line item that includes the first 28 characters of the item title (description ), its extended_price in currency format, and up to three characters of the taxing country (tax_code ), such as US . |
28 | Defines the width of each column in the next table level to be created and aligns the text to the right. Column 1 is 16 characters wide, column 2 is 20 characters wide, and column 3 is 4 characters wide. |
29 | Sets a condition that inserts quantity if a line item count is greater than one, or inserts 1 . price is the per-unit price expressed in currency format. |
30 | Starts a subsection and specifies that each of the price_modifiers (discounts or price changes) listed will be formatted as follows. |
31 | Creates a table that displays the discount description and amount in currency format. The description is maintained in your Composable Commerce Project. If this is a manual discount or price change, the amount was specified by the user on the price modifier detail page during the checkout. |
32 | Ends the subsection about price_modifiers . |
33 | Defines the width of each column in the next table level to be created and aligns the text to the right. Column 1 is 16 characters wide, column 2 is 20 characters wide, and column 3 is 4 characters wide. |
34 | Starts a subsection and specifies that each of the attributes (defined in the Composable Commerce Project) listed will be formatted as follows. |
35 | Creates a table that displays the label (followed by a colon) and value of each line-item attribute—for example, color: Black. |
36 | Ends the subsection that formats attributes . |
37 | Ends the subsection that formats line_items . |
38 | Defines the width of and center-aligns the following line. |
39 | Inserts a ruled line. |
40 | Defines the width of each column in the next table level to be created and aligns the text to the left. Column 1 is 20 characters wide and column 2 uses the remaining space. |
41 | Adds level three emphasis to the plain-text word Total:, then uses currency format to display the total due for the cart. |
42 | Blank line, which renders as white space (linefeed) on the receipt. |
43 | Defines the width of each column in the next table level to be created and aligns the text to the right. Column 1 is 20 characters wide and column 2 uses the remaining space. |
44 | Starts a subsection and specifies that each of the tenders used in the transaction will be formatted as follows. |
45 | Creates a table that displays the payment type (with level one emphasis followed by a colon) and amount of each tender applied in the transaction (formatted as currency)—for example, Cash: 137.08. |
46 | Sets a condition that the following formatting will be used if one of the tenders listed is a charge_card , which is a credit or debit card. |
47 | Sets a condition that the following formatting is used if there is additional.information available about the charge_card . |
48 | Sets a condition that the following formatting will be used if there is a receipt.data package returned by the payment service provider (PSP) for the charge_card . |
49 | Defines the width of each column in the next table level to be created and aligns the text to the right. Column 1 is 16 characters wide and column 2 is 20 characters wide. |
50-66 | Creates a table that displays information that was returned in the receipt.data package. For more information, contact your PSP. |
67 | Ends the subsection that formats receipt.data and starts an else subsection for any charge_card that lacks a PSP-provided receipt.data . |
68 | Defines the width of each column in the next table level to be created and aligns the text to the right. Column 1 is 24 characters wide and column 2 is 20 characters wide. |
69-73 | Creates a table that displays information that was returned for the charge_card . |
74 | Ends the subsections that format the additional.information and charge_card conditions. |
75 | Sets a condition that the following formatting is used if the transaction contains a tender type of gift_card . |
76 | Defines the width of each column in the next table level to be created and aligns the text to the right. Column 1 is 16 characters wide and column 2 is 20 characters wide. |
77-78 | Creates a table that displays the gift_card.last4 (obtained from the user who swiped, scanned, or typed the gift card), and the gift_card.type (returned by the gift card processor). |
79 | Ends the subsection that formats gift_card information. |
80 | Sets a condition that the following formatting will be used if the transaction contains a tender type of wallet . |
81 | Defines the width of each column in the next table level to be created and aligns the text to the right. Column 1 is 16 characters wide and column 2 is 20 characters wide. |
82 | Displays a label and the wallet.method that was used to collect payment—for example type, tap, swipe, or insert. |
83-85 | Creates a table that displays the information returned by the wallet processor. |
86 | Ends the subsection that formats the wallet information. |
87 | Ends the section that formats thetenders information. |
88 | Defines the width of the following lines and aligns them to the center. |
89 | Displays a plain-text label of VAT Summary and gives it level one emphasis. This label announces the tax section of the receipt. Change the VAT Summary title to the type of tax summary applicable to your locale. |
90 | Defines the width of each column in the next table level to be created. Column 1 is 10 characters wide, column 2 is 12 characters wide, column 3 is 12 characters wide, and column 4 uses the remaining space. |
91 | Creates a table with these plain-text column headers: Code (assigned within the tax service), Rate (set up within the tax service), Net (total net that was calculated for the cart), and VAT (total tax as calculated by the tax service). |
92 | Starts a subsection and specifies that each tax_summary (taxation code) listed will be formatted as follows. |
93 | Inserts the code , tax_rate , total_net , and total_tax values in the correct column, creating a row for each tax code found. |
94 | Ends the subsection about tax_summary . |
95 | Blank line, which renders as white space (linefeed) on the receipt. |
96 | Sets a condition for data within the if tags; include it only if this is a reprinted receipt. |
97 | Aligns the following text to the center of the page. |
98 | Specifies the text that prints only when the if condition is met; uses carets for level three emphasis and double asterisks for italics. |
99 | Blank line, which renders as white space (linefeed) on the receipt. |
100 | Ends the "if" condition for reprinted receipts. |
101 | Defines the width of the lines that follow and center-aligns them. |
102 | Displays the plain-text label: Thank you! Come again! |
You don't need a cutfeed
directive, as ReceiptLine automatically adds this when it reaches the end of the template.