Refund receipt template

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

refund-receipttext
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 numberSource and description of field
1Inserts 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.
2Aligns the following text to the center of the page.
3Inserts the location name from the Location Name field.
4Inserts the first line of the address from the Address Line 1 field. Also inserts Address Line 2 if it contains text.
5Inserts the city or town from the City/Town field.
6Inserts the state or county from the State or Province/County field.
7Inserts the postal code from the Postal Code field.
8Inserts the telephone number from the Telephone Number field.
9Starts a conditional block; the enclosed content prints only for a reprinted receipt.
10Aligns the following text to the center of the page.
11Inserts “Reprinted Receipt” with level-three emphasis.
12Ends the conditional block for reprinted receipts.
13Aligns the following text to the left of the page.
14Creates 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.
15Inserts the workstation_id for the workstation where the transaction was completed.
16Inserts the user_id of the user who was logged in when the sale was tendered.
17Inserts 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.
18Inserts the order_number assigned to this transaction by InStore. This value is also visible on the Search transactions page of the InStore Center.
19Aligns the following text to the center of the page.
20Renders a barcode for the order_number.
21Starts a subsection and specifies that each of the carts listed will be formatted as follows.
22Starts a nested loop and formats each line item as specified by the following lines.
23Defines 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 (*).
24Inserts 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).
25Defines 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.
26Inserts quantity if greater than one; otherwise prints 1. price is the per-unit price in currency format.
27Starts a nested loop and formats each price_modifiers entry (discount or price change).
28Inserts 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.
29Ends the price_modifiers loop.
30Defines 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.
31Starts a nested loop and formats each attributes entry defined in the Composable Commerce project.
32Inserts a row with the attribute label: and its value (for example, color: Black).
33Ends the attributes loop.
34Ends the line_items loop.
35Ends the carts loop.
36Sets the width to the available page width and centers the following content.
37Blank line (line feed).
38Inserts a ruled line.
39Blank line (line feed).
40Defines 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.
41Inserts “Refund:” with level-three emphasis (right-aligned within 20 characters), followed by the total in currency format.
42Defines 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.
43Starts a loop and formats each refunds tender entry.
44Inserts a row with the tender type (emphasized) and its amount in currency format (for example, Cash: 21.59).
45Starts a conditional block used when the tender is charge_card (credit or debit card).
46Starts a conditional block used when additional_data is available for the charge_card.
47Starts a conditional block used when a receiptData package is returned by the payment service provider (PSP) for the charge_card.
48Defines 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–65Inserts fields returned in the receiptData package. Contact your PSP for field definitions.
66Ends the receiptData block and starts an else block for charge_card entries without PSP-provided receipt data.
67Defines 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–72Inserts card detail fields returned for the charge_card.
73Ends the additional_data and charge_card conditional blocks.
74Starts a conditional block used when the refund includes a gift_card tender.
75Defines 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–77Inserts the last four digits of the gift card and the gift card type returned by the processor.
78Ends the gift_card block.
79Starts a conditional block used when the refund includes a wallet tender.
80Defines 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.
81Inserts the wallet.method used to collect payment (for example, tap, swipe, or insert).
82–84Inserts the wallet processor fields (wallet.transaction_id, wallet.merchant_id, wallet.terminal_id).
86Ends the refunds loop.
87Sets the width for the following lines and centers the content.
88Inserts the “VAT Summary” heading.
89Defines the column widths for the VAT summary table.
90Inserts the VAT summary table header.
91Starts a loop over tax_summary entries.
92Inserts a row with code, tax_rate, total_net, and total_tax (currency format).
93Ends the tax_summary loop.
95Inserts a horizontal rule.
97Starts a conditional block for reprinted receipts.
98Sets the width to full and centers the following text.
99Inserts “Reprinted Receipt” with level-three emphasis.
100Ends the reprint block.
You don't need a cutfeed directive, as ReceiptLine automatically adds this when it reaches the end of the template.