Refund receipt template
Use our sample template for creating refund receipts.
You can view the refund receipt template in the InStore Center by creating a new Receipt Template set that includes the refund 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. `^^^**_ Reprinted Receipt _**`12. `{{/if}}`13. `{align:left}`14. `|Date: |{{timestamp_formatted}}`15. `|Workstation: |{{workstation_id}}`16. `|Cashier: |{{user_id}}`17. `|Transaction #: |{{order_number}}`18. `|VAT ID: |{{tax_id}}`19. `{align:center}`20. `{{barcode order_number}}`21. `{{#each carts}}`22. `{{#each line_items}}`23. `{width:30,12,_; align:left}`24. `|{{truncate description 28}} | ({{formatCurrency extended_price}})| {{tax_code}}`25. `{width:16,20,4; align:right}`26. `{{#if quantity}}{{quantity}}{{else}}1{{/if}} @ {{formatCurrency price}}`27. `{{#each price_modifiers}}`28. `| {{description}} | ({{formatCurrency amount}})|'29. `{{/each}}`30. `{width:16,20,4; align:right}31. `{{#each attributes}}`32. `| {{label}}: | {{value}}|'33. `{{/each}}`34. `{{/each}}`35. `{{/each}}`36. `{width:_; align:center}`37.38. `---`39.40. `{width:20,_; align:left}`41. `^^^Refund: | ^^^{{formatCurrency total}}'42. `{width:20,_; align:right}`43. `{{#each refunds}}`44. `|^{{type}}: | {{formatCurrency amount}}`45. `{{#if charge_card}}`46. `{{#if charge_card.additional_data}}`47. `{{#if charge_card.additional_data.receiptData}}`48. `{width:16,20; align:right}`49. `|Card: | {{charge_card.additional_data.receiptData.pan}}`50. `|PAN seq: | {{charge_card.additional_data.receiptData.panSeq}}`51. `|Pref. name: | {{charge_card.additional_data.receiptData.preferredName}}`52. `|Card type: | {{charge_card.additional_data.receiptData.cardType}}`53. `|Payment method: | {{charge_card.additional_data.receiptData.paymentMethod}}`54. `|Payment variant: | {{charge_card.additional_data.receiptData.paymentMethodVariant}}`55. `|Entry mode: | {{charge_card.additional_data.receiptData.posEntryMode}}`56. `|AID: | {{charge_card.additional_data.receiptData.aid}}`57. `|MID: | {{charge_card.additional_data.receiptData.mid}}`58. `|TID: | {{charge_card.additional_data.receiptData.tid}}`59. `|PTID: | {{charge_card.additional_data.receiptData.ptid}}`60. `|Auth. code: | {{charge_card.additional_data.receiptData.authCode}}`61. `|Response code: | {{charge_card.authorization_response_code}}`62. `|Tender: | {{charge_card.additional_data.receiptData.txRef}}`63. `|Reference: | {{charge_card.additional_data.receiptData.mref}}`64. `|Type: | {{charge_card.additional_data.receiptData.txtype}}`65. `|^TOTAL: | {{formatCurrency charge_card.additional_data.receiptData.totalAmount}}`66. `{{/if}}{{else}}`67. `{width:24,20; align:right}`68. `|card number: | {{charge_card.last4}}`69. `|account type: | {{charge_card.brand}}/{{charge_card.account_type}}`70. `|application name: | {{charge_card.application_preferred_name}}`71. `|AID: | {{charge_card.dedicated_file_name}}`72. `|ARC: | {{authorization_response_code}}`73. `{{/if}}{{/if}}`74. `{{#if gift_card}}`75. `{width:16,20; align:right}`76. `|card number: | _{{gift_card.last4}}`77. `|card type: | {{gift_card.type}}`78. `{{/if}}`79. `{{#if wallet}}`80. `{width:16,20; align:right}`81. `method: {{wallet.method}}`82. `|transaction id: | {{wallet.transaction_id}}`83. `|merchant id: | {{wallet.merchant_id}}`84. `|terminal id: | {{wallet.terminal_id}}`85. `{{/if}}`86. `{{/each}}`87. `{width:_; align:center}`88. `^VAT Summary`89. `{width:10,12,12,\*}`90. `Code | Rate| Net| VAT`91. `{{#each tax_summary}}`92. `{{code}} | {{tax_rate}}| {{formatCurrency total_net}}| {{formatCurrency total_tax}}`93. `{{/each}}`94.95. `---`96.97. `{{#if reprint}}`98. `{width:\*; align:center}`99. `^^^**_ Reprinted Receipt _**`100. `{{/if}}`
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 | Specifies the text that prints only when the if condition is met; uses carets for level three emphasis and double asterisks for italics. |
12 | Ends the if condition for reprinted receipts. |
13 | Aligns the following text to the left of the page. |
14 | 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. |
15 | Inserts the workstation_id for the workstation where the transaction was completed. |
16 | Inserts the user_id_ of the user who was logged in when the sale was tendered. |
17 | Inserts the order_number that was assigned to this transaction by InStore; this is also visible on Search Transactions page of the InStore Center. |
18 | 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. |
19 | Aligns the following text to the center of the page. |
20 | Inserts the barcode representation of the {{order_number}} .` |
21 | Starts a subsection and specifies that each of the carts listed will be formatted as follows. |
22 | Starts a subsection and specifies that each of the line items listed will be formatted as follows. |
23 | 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 (* ). |
24 | 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 . |
25 | Defines the width of each column in the next table 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. |
26 | 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. |
27 | Starts a subsection and specifies that each of the price_modifiers (discounts or price changes) listed will be formatted as follows. |
28 | 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. |
29 | Ends the subsection about price_modifiers . |
30 | Defines the width of each column in the next table 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. |
31 | Starts a subsection and specifies that each of the listed attributes (defined in the Composable Commerce project) will be formatted as follows. |
32 | Creates a table that displays the label (followed by a colon) and value of each line-item attribute—for example, color: Black. |
33 | Ends the subsection that formats attributes . |
34 | Ends the subsection that formats line_items . |
35 | Ends the subsection that formats carts . |
36 | Formats the following below to occupy the available page width and to align to the center of the page. |
37 | Blank line, which renders as white space (linefeed) on the receipt. |
38 | Inserts a ruled line. |
39 | Blank line, which renders as white space (linefeed) on the receipt. |
40 | Defines the width of each column in the next table 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 Refund:, aligns it to the right within its allotted 20 spaces, then uses currency format to display the total due for the cart. |
42 | Defines the width of each column in the next table to be created and aligns the text to the right. Column 1 is 20 characters wide and column 2 uses the remaining space. |
43 | Starts a subsection and specifies that each of the refunds (tender types) will be formatted as follows. |
44 | Creates a table that displays the refund tender type (with level one emphasis followed by a colon) and amount of each tender used in the refund (formatted as currency)—for example, Cash: 21.59 |
45 | Sets a condition that the following formatting will be used if one of the refund tenders listed is a charge_card , which is a credit or debit card. |
46 | Sets a condition that the following formatting will be used if there is additional.information available about the charge_card . |
47 | 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 . |
48 | Defines the width of each column in the next table to be created and aligns the text to the right. Column 1 is 16 characters wide and column 2 is 20 characters wide. |
49-65 | Creates a table that displays information that was returned in the receipt.data package. For more information, contact your PSP. |
66 | Ends the subsection that formats receipt.data and starts an else subsection for any charge_card that lacks a PSP-provided receipt.data . |
67 | Defines the width of each column in the next table to be created and aligns the text to the right. Column 1 is 24 characters wide and column 2 is 20 characters wide. |
68-72 | Creates a table that displays information that was returned for the charge_card . |
73 | Ends the subsections that format the additional.information and charge_card conditions. |
74 | Sets a condition that the following formatting will be used if the refund contains a tender type of gift_card . |
75 | Defines the width of each column in the next table to be created and aligns the text to the right. Column 1 is 16 characters wide and column 2 is 20 characters wide. |
76-77 | 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). |
78 | Ends the subsection that formats the gift_card information. |
79 | Sets a condition that the following formatting will be used if the refund contains a tender type of wallet . |
80 | Defines the width of each column in the next table to be created and aligns the text to the right. Column 1 is 16 characters wide and column 2 is 20 characters wide. |
81 | Displays a label and the wallet.method that was used to collect payment—for example type, tap, swipe, or insert. |
82-84 | Creates a table that displays the information returned by the wallet processor. |
85 | Ends the subsection that formats the wallet information. |
86 | Ends the section that formats the refunds information. |
87 | Defines the width of the following lines and aligns them to the center. |
88 | 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. |
89 | Defines the width of each column in the next table 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. |
90 | 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). |
91 | Starts a subsection and specifies that each tax_summary (taxation code) listed will be formatted as follows. |
92 | Inserts the code , tax_rate , total_net , and total_tax values in the correct column, creating a row for each tax code found. |
93 | Ends the subsection about tax_summary . |
94 | Blank line, which renders as white space (linefeed) on the receipt. |
95 | Inserts a ruled line. |
96 | Blank line, which renders as white space (linefeed) on the receipt. |
97 | Sets a condition for data within the if tags; include only if this is a reprinted receipt. |
98 | Aligns the following text to the center of the page and sets it to occupy the available page width. |
99 | Specifies the text that prints only when the if condition is met; uses carets for level three emphasis and double asterisks for italics. |
100 | Ends the if condition for reprinted receipts. |
You don't need a cutfeed
directive, as ReceiptLine automatically adds this when it reaches the end of the template.