# Manage and display receipt data Configure receipt templates to include and format data for locations, customers, cart contents, payments, and other transaction details. You can also inject external data (for example, manufacturing, assembly, delivery, or fulfillment attributes) through a receipt callback. To explore all available data fields, review the JSON schema in the GitHub repository for the [Receipt Print Server](https://github.com/NebulaTerra/receipt-print-server). ## Receipt processing flow The InStore Receipt Print Server compiles data, applies templates, and generates output in these stages: 1. Collect required data and transform it into JSON. 2. Apply the retailer-defined template that uses both [Handlebars](https://handlebarsjs.com/) and [ReceiptLine](https://www.ofsc.or.jp/index.php/ReceiptLine) markup. 3. Conform to the [Open Foodservice System Consortium](https://www.ofsc.or.jp/index.php/OfscStandard) standard. 4. Merge JSON with the template using the Handlebars engine (replace Handlebars tags with values). 5. Render the merged markup with the ReceiptLine engine to produce the following: - An on-screen scalable vector graphic (SVG) preview. - Printer instructions for supported receipt printers. Printer readability is accomplished with an environment variable that is required in every local environment - Output that you can forward through SMS or email channels. ## Receipt types The following receipt types are generated by InStore transactions: - [Sales receipt](/instore/implement-instore/receipts/sales-receipt.md) - [Gift receipt](/instore/implement-instore/receipts/gift-receipt.md) - [Refund receipt](/instore/implement-instore/receipts/refund-receipt.md) - [Nullified payment receipt](/instore/implement-instore/receipts/nullified-payment-receipt.md) ## Templates The base English template set ships with InStore. Translate static text for each non-English locale you support. For more information about creating and applying custom sets, see [Receipt template sets](/instore/use-the-instore-center/receipt-template-sets.md). Updates from commercetools apply only to the base template set. Custom sets are not updated automatically. To adopt improvements, manually merge changes into your customized templates or revert to the base set. ## InStore-specific helpers For standard helpers, see [Receipt helpers](/instore/implement-instore/receipts/receipt-helpers.md). The following helpers and patterns are specific to InStore. ### Include the Location ID By default, receipts display only the location name. You can display both the location name and the location ID assigned on the **Location detail** page of the Administrator Portal. The location ID also appears in each transaction number. ```handlebars title="Location ID example" Branch: {{location.location_ID}} ``` ### Display a Reprinted Receipt label Show a **Reprinted Receipt** label only on reprinted (not original) receipts. Insert the following block in the regular Sales or Refund receipt template; it will not print on original receipts, only reprints. ```handlebars title="Reprint label block" {{#if reprint}}***Reprinted Receipt***{{/if}} ``` Translate only the visible text. Asterisks are optional. ### Display Cash Rounding label and amount When cash rounding is enabled, show the rounded remainder for cash tenders only. ```handlebars title="Cash rounding block" {{#if type.cash}} {{indent 2}}cash rounding: {{#rightjustify}}{{cash.roundedRemainder}}{{/rightjustify}} {{/if}} ``` Translate only the phrase "cash rounding". ### Make conditional statements based on numeric values Use comparison helpers to branch logic: - `if_gt` (greater than) - `if_gte` (greater than or equal) - `if_lt` (less than) - `if_lte` (less than or equal) - `if_eq` (equal) - `if_ne` (not equal) ```handlebars title="Conditional example" {{#if_gte amount 10000}} {{!-- Action A: e.g., print coupon --}} {{else}} {{!-- Action B: e.g., print promotion --}} {{/if_gte}} ``` Replace the commented placeholders (Action A and Action B) with the receipt fragments or partials you want to output. For instance, this pattern can drive simple offer logic: if the customer spends at least 100.00, print a coupon worth 5.00 (Action A); otherwise, print an advertisement for an upcoming promotion (Action B). This keeps business rules declarative inside the template while the actual reusable content lives in partials. Example using partials: ```handlebars title="Conditional example with partials" {{#if_gte amount 10000}} {{> couponFiveOff}} {{else}} {{> promoUpcoming}} {{/if_gte}} ``` In this example, `couponFiveOff` and `promoUpcoming` are Handlebars partials you define elsewhere in the template set. ### Currency formatting Use the `formatcurrency` prefix to format a number as a localized currency value. Add symbols such as `$` or `£` manually if required. ### Include all data provided by Payment Provider The `receiptData` attribute contains the raw data fields supplied by the payment provider (for example, Adyen). Display or post-process these fields as needed. ## Non-customer-facing receipts InStore also produces printed receipts for these cash management activities: - Bank deposit - Cash count - Pay in - Pay out - Safe deposit - Transfer in - Transfer out Because most retailers decide not to customize these, details about formatting internal-only receipts are not specified in this documentation. However, the same formatting rules and methods apply to these receipts as to transaction receipts. If you have questions about customizing these, contact the [support team](https://support.commercetools.com/). ## Related pages - [Area overview page with navigation](/instore.md) - [Previous page: Create a receipt template](/instore/implement-instore/receipts/create-receipt-template.md) - [Next page: Send receipts by email or text message](/instore/implement-instore/receipts/email-receipt.md) - [Search documentation and API specs](/search.md)