# 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](/instore/implement-instore/receipts/create-receipt-template.md) that includes the refund receipt template, then editing it. Store associates view and print refund receipts in the InStore POS. ## 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. |Order: |{{../order_number}} 21. {{barcode order_number}} 22. {{#each carts}} 23. {{#each line_items}} 24. {width:30,12,*; align:left} 25. |{{truncate description 28}} | ({{formatCurrency extended_price}})| {{tax_code}} 26. {width:16,20,4; align:right} 27. {{#if quantity}}{{quantity}}{{else}}1{{/if}} @ {{formatCurrency price}} 28. {{#each price_modifiers}} 29. | {{description}} | ({{formatCurrency amount}})|' 30. {{/each}} 31. {width:16,20,4; align:right} 32. {{#each attributes}} 33. | {{label}}: | {{value}}|' 34. {{/each}} 35. {{/each}} 36. {{/each}} 37. {width:*; align:center} 38. --- 39. {width:20,*; align:left} 40. ^^^Refund: | ^^^{{formatCurrency total}} 41. {width:20,*; align:right} 42. {{#each refunds}} 43. |^{{type}}: | {{formatCurrency amount}} 44. {{#if cash}} 45. |Cash Rounding: | {{formatCurrency cash.roundedRemainder align:right}}{{/if}} 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 voucher}} 81. {width:16,20; align:right} 82. |Voucher number: | {{voucher.number}} 83. {align:center} 84. {{barcode voucher.number}} 85.{{/if}} 86. {{#if wallet}} 87. {width:16,20; align:right} 88. |Method: | {{wallet.method}} 89. |transaction id: | {{wallet.transaction_id}} 90. |merchant id: | {{wallet.merchant_id}} 91. |terminal id: | {{wallet.terminal_id}} 92. {{/if}} 93. {{/each}} 94. {width:*; align:center} 95. ^VAT Summary 96. {width:10,12,12,\*} 97. Code | Rate| Net| VAT 98. {{#each tax_summary}} 99. {{code}} | {{tax_rate}}| {{formatCurrency total_net}}| {{formatCurrency total_tax}} 100. {{/each}} 101. --- 102. {{#if reprint}} 103. {width:\*; align:center} 104. ^^^*** Reprinted Receipt *** 105. {{/if}} 106. {width:*; align:center} 107. ^^Thank you! Come again! ``` ## 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 | Prints the logo image that you previously loaded into the physical printer memory at position 32 32 in the printer. This will not show on the SVG image. See your printer manufacturer documentation for logo injection and printing capabilities for the particular make and model. | | | 2 | Aligns the text below 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 variable originally entered in the **TaxId** field of the **General** tab on the **Environment** page of the InStore Center, unless an overriding Tax ID was provided on the **Location Information** page. | | | 18 | Inserts the `order_number` that was assigned to this transaction by InStore; this is also visible on [**Search Transactions**](/instore/use-the-instore-center/transactions.md) page of the InStore Center. | | | 19 | Aligns the text below to the center of the page. | | | 20 | Creates a table containing the plain-text label for the barcode below. | | | 21 | Inserts the barcode representation of the `{{order_number}}`. | | | 22 | Starts a subsection and specifies that each of the `carts` listed will be formatted as follows. | | | 23 | Starts a subsection and specifies that each of the `line items` listed will be formatted as follows. | | | 24 | 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 (`*`). | | | 25 | 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`. | | | 26 | 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. | | | 27 | 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. | | | 28 | Starts a subsection and specifies that each of the `price_modifiers` (discounts or price changes) listed will be formatted as follows. | | | 29 | Creates a table that displays the discount `description` and `amount` in currency format. The description is maintained in your 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. | | | 30 | Ends the subsection about `price_modifiers`. | | | 31 | 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. | | | 32 | Starts a subsection and specifies that each of the listed `attributes` (defined in the Project) will be formatted as follows. | | | 33 | Creates a table that displays the `label` (followed by a colon) and `value` of each line-item attribute—for example, color: Black. | | | 34 | Ends the subsection that formats `attributes`. | | | 35 | Ends the subsection that formats `line_items`. | | | 36 | Ends the subsection that formats `carts`. | | | 37 | Formats the text below to occupy the available page width and to align to the center of the page. | | | 38 | Inserts a ruled line. | | | 39 | Creates a 2-column table for the refund amount whose first column is 20 characters wide and whose second column uses the remaining space. Aligns the table text to the left. | | | 40 | 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. | | | 41 | Defines the width of each column in the following tables to be created and aligns the text to the right. Column 1 is `20` characters wide and column 2 uses the remaining space. | | | 42 | Starts a subsection and specifies that each of the `refunds` (tender types) will be formatted as follows. | | | 43 | 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 | | | 44 | Sets a condition that the following formatting will be used if one of the refund tenders listed is `cash`. | | | 45 | Creates a table with the plain-text phrase Cash Rounding: on the left and the value for `cash.roundedRemainder` on the right. Sets format for the value and alignment and ends the `cash` section. | | | 46 | 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. | | | 47 | Sets a condition that the following formatting will be 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 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 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 will be used if the refund contains a tender type of `gift_card`. | | | 76 | 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. | | | 77-78 | Creates a table that displays the `gift_card.last4` (obtained from the user who swiped, scanned, or typed the stored-value card) and the `gift_card.type` (returned by the stored-value card processor). | | | 79 | Ends the subsection that formats the `gift_card` information. | | | 80 | Sets a condition that the following formatting will be used if the refund contains a tender type of `voucher`. | | | 81 | 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. | | | 82 | Creates a table that displays a plain-text label and the `voucher.number` that was generated. | | | 83 | Center-aligns the following barcode. | | | 84 | Displays the value of `barcode voucher.number`. | | | 85 | Ends the subsection for `voucher`. | | | 86 | Sets a condition that the following formatting will be used if the refund contains a tender type of `wallet`. | | | 87 | Defines the width of each column in the next table to be created and aligns the text to the right. | | | 88-91 | Creates a table that displays the information returned by the wallet processor. Displays a label and the `wallet.method` that was used to collect payment—for example type, tap, swipe, or insert. | | | 92 | Ends the subsection that formats the `wallet` information. | | | 93 | Ends the section that formats the `refunds` information. | | | 94 | Defines the width of the following lines and aligns them to the center. | | | 95 | 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. | | | 96 | 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. | | | 97 | 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). | | | 98 | Starts a subsection and specifies that each `tax_summary` (taxation code) listed will be formatted as follows. | | | 99 | Inserts the `code`, `tax_rate`, `total_net`, and `total_tax` values in the correct column, creating a row for each tax code found. | | | 100 | Ends the subsection about `tax_summary`. | | | 101 | Inserts a ruled line. | | | 102 | Sets a condition for data within the `if` tags; include only if this is a reprinted receipt. | | | 103 | Aligns the text below to the center of the page and sets it to occupy the available page width. | | | 104 | Specifies the text that prints only when the `if` condition is met; uses carets for level three emphasis and double asterisks for italics. | | | 105 | Ends the `if` condition for reprinted receipts. | | | 106 | Center-aligns the text below. | | | 107 | Applies level-two emphasis to plain-text message. | | You don't need a `cutfeed` directive, as ReceiptLine automatically adds this when it reaches the end of the template. ## Related pages - [Area overview page with navigation](/instore.md) - [Previous page: Nullified payment receipt template](/instore/implement-instore/receipts/nullified-payment-receipt.md) - [Next page: Helpers for receipt templates](/instore/implement-instore/receipts/receipt-helpers.md) - [Search documentation and API specs](/search.md)