Use this sample template to create 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. Store associates view and print refund receipts in the InStore colleague app.
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. `|VAT ID: |{{tax_id}}`
18. `|Transaction #: |{{order_number}}`
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 reference
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 | Inserts the logo image that you previously injected into the physical printer memory at position 32 32 (not shown in the SVG preview). Refer to printer documentation for logo injection support. |
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 city or town from the City/Town field. |
6 | Inserts the state or county from the State or Province/County field. |
7 | Inserts the postal code from the Postal Code field. |
8 | Inserts the telephone number from the Telephone Number field. |
9 | Starts a conditional block; the enclosed content prints only for a reprinted receipt. |
10 | Aligns the following text to the center of the page. |
11 | Inserts “Reprinted Receipt” with level-three emphasis. |
12 | Ends the conditional block 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 value originally entered in the TaxId field on the General tab of the Environment page in the InStore Center, unless an overriding Tax ID was provided on the Location Information page. |
18 | Inserts the order_number assigned to this transaction by InStore. This value is also visible on the Search transactions page of the InStore Center. |
19 | Aligns the following text to the center of the page. |
20 | Renders a barcode for the order_number . |
21 | Starts a subsection and specifies that each of the carts listed will be formatted as follows. |
22 | Starts a nested loop and formats each line item as specified by the following lines. |
23 | Defines the width of each column in the next table and aligns the text to the left. Column 1 is 30 characters, column 2 is 12 characters, and column 3 uses the remaining space (*). |
24 | Inserts a row with the first 28 characters of the line item description , the extended_price in currency format, and the tax_code (for example, US). |
25 | Defines the width of each column in the next table and aligns the text to the right. Column 1 is 16 characters, column 2 is 20 characters, and column 3 is 4 characters. |
26 | Inserts quantity if greater than one; otherwise prints 1 . price is the per-unit price in currency format. |
27 | Starts a nested loop and formats each price_modifiers entry (discount or price change). |
28 | Inserts a row with the discount description and discount amount in currency format. The description is maintained in your Composable Commerce Project. For manual discounts or price changes, the amount is specified on the price modifier detail page during checkout. |
29 | Ends the price_modifiers loop. |
30 | Defines the width of each column in the next table and aligns the text to the right. Column 1 is 16 characters, column 2 is 20 characters, and column 3 is 4 characters. |
31 | Starts a nested loop and formats each attributes entry defined in the Composable Commerce project. |
32 | Inserts a row with the attribute label: and its value (for example, color: Black). |
33 | Ends the attributes loop. |
34 | Ends the line_items loop. |
35 | Ends the carts loop. |
36 | Sets the width to the available page width and centers the following content. |
37 | Blank line (line feed). |
38 | Inserts a ruled line. |
39 | Blank line (line feed). |
40 | Defines the width of each column in the next table and aligns the text to the left. Column 1 is 20 characters; column 2 uses the remaining space. |
41 | Inserts “Refund:” with level-three emphasis (right-aligned within 20 characters), followed by the total in currency format. |
42 | Defines the width of each column in the next table and aligns the text to the right. Column 1 is 20 characters; column 2 uses the remaining space. |
43 | Starts a loop and formats each refunds tender entry. |
44 | Inserts a row with the tender type (emphasized) and its amount in currency format (for example, Cash: 21.59). |
45 | Starts a conditional block used when the tender is charge_card (credit or debit card). |
46 | Starts a conditional block used when additional_data is available for the charge_card . |
47 | Starts a conditional block used when a receiptData package is returned by the payment service provider (PSP) for the charge_card . |
48 | Defines the width of each column in the next table and aligns the text to the right. Column 1 is 16 characters; column 2 is 20 characters. |
49–65 | Inserts fields returned in the receiptData package. Contact your PSP for field definitions. |
66 | Ends the receiptData block and starts an else block for charge_card entries without PSP-provided receipt data. |
67 | Defines the width of each column in the next table and aligns the text to the right. Column 1 is 24 characters; column 2 is 20 characters. |
68–72 | Inserts card detail fields returned for the charge_card . |
73 | Ends the additional_data and charge_card conditional blocks. |
74 | Starts a conditional block used when the refund includes a gift_card tender. |
75 | Defines the width of each column in the next table and aligns the text to the right. Column 1 is 16 characters; column 2 is 20 characters. |
76–77 | Inserts the last four digits of the gift card and the gift card type returned by the processor. |
78 | Ends the gift_card block. |
79 | Starts a conditional block used when the refund includes a wallet tender. |
80 | Defines the width of each column in the next table and aligns the text to the right. Column 1 is 16 characters; column 2 is 20 characters. |
81 | Inserts the wallet.method used to collect payment (for example, tap, swipe, or insert). |
82–84 | Inserts the wallet processor fields (wallet.transaction_id , wallet.merchant_id , wallet.terminal_id ). |
86 | Ends the refunds loop. |
87 | Sets the width for the following lines and centers the content. |
88 | Inserts the “VAT Summary” heading. |
89 | Defines the column widths for the VAT summary table. |
90 | Inserts the VAT summary table header. |
91 | Starts a loop over tax_summary entries. |
92 | Inserts a row with code , tax_rate , total_net , and total_tax (currency format). |
93 | Ends the tax_summary loop. |
95 | Inserts a horizontal rule. |
97 | Starts a conditional block for reprinted receipts. |
98 | Sets the width to full and centers the following text. |
99 | Inserts “Reprinted Receipt” with level-three emphasis. |
100 | Ends the reprint block. |
You don't need a
cutfeed
directive, as ReceiptLine automatically adds this when it reaches the end of the template.