Receipt code editor

You can customize the template for your printed receipts by using the Liquid editor in the Shopify admin. The files that make up your receipts contain Liquid, Shopify's templating language. You should only edit the code for your receipts if you know HTML and CSS, and have a basic understanding of Liquid.

Access the Liquid editor

You can change the receipt templates and the section templates that are used on your printed receipts. Receipt templates are the types of receipts that you print in your store. Section templates are parts of the receipts you print in your store. Sections can be reused by multiple receipts. You can edit your templates by using the Liquid editor:

Steps:

  1. From your Shopify admin, go to Settings > Apps and sales channels.

  2. Click Point of sale.

  3. Click Open sales channel.

  4. Click Settings > Receipt Customization.

  5. Click horizontal menu button > Edit code.

  6. Click Edit code.

  7. Edit your code to customize your receipts.

  8. Click Save.

Edit your receipt templates

You can edit specific parts of your receipts.

Receipt objects

Description of receipt objects
PropertyDescription
shop
Contains the store information. For example the store name.
location
Contains the retail location information. For example, address and phone number.
order
Contains the order data, including the line items, the discounts, the taxes, and the transaction information.

Order object

Description of the order object
PropertyDescription
id
Id of the order.
source_identifier
A unique POS or third party order identifier.
change_due
Change due on the order.
balance_due
Amount owed on this order.
name
The unique identifier for the order that appears on the order page in the Shopify admin and the Order status page. For example, "#1001", "EN1001", or "1001-A". This value isn't unique across multiple stores.
note
The contents of the note associated with the order.
line_items
A list of the order's line items.
subtotal_price
The sum of the prices for all line items after discounts and before returns. If taxesIncluded is true, then the subtotal also includes tax.
total_price
The total price of the order, before returns. This includes taxes and discounts.
total_tip_received
The sum of all tip amounts for the order.
discounts
The total amount of discounts.
transactions
A list of transactions associated with the order.
taxes_included
Whether taxes are included in the subtotal price of the order.
tax_lines
A list of all tax lines applied to line items on the order, before returns. Tax line prices represent the total price for all tax lines with the same rate and title.
customer
The customer that placed the order.
shipping_address
The shipping address on the order.
shipping_groups
The list of shipping group of the order. Each group contains line items that are fulfilled together.

Shipping group object

Description of the shipping group object
PropertyDescription
destination
Destination of the the products being shipped
products
A list of products being shipped.

Line item object

Description of the line item object
PropertyDescription
id
The id of the line item.
name
The title of the product, optionally appended with the title of the variant (if applicable).
variant_title
The title of the variant at time of order creation.
price
The unit price of the line item when the order was created. This value doesn't include discounts.
is_gift_card
Whether the line item represents the purchase of a gift card.
discount
The total discount that have been allocated to the line item by discount applications, including discounts allocated to refunded and removed quantities.
total_price
The total for this line item.
tax_rates
The tax lines for this line item.
custom_attributes
A list of attributes that represent custom features or special requests.
variant_title
The variant title.
variant_id
The id of the variant.
variant_metafields
A list of custom fields that a merchant associated with the variant.
staff_member_description
Staff member attributed to the line item.
product_metafields
A list of custom fields that a merchant associated with the product.

Receipt filters

Description of receipt filters
PropertyDescription
t
Translates predefined labels into the correct language.
money
Formats the price in your location's currency.
escape
Escapes special characters in HTML, such as <>, ', and &, and converts characters into escape sequences.
barcode
Generates a 1D barcode SVG.
qrcode
Generates a 2D barcode SVG.

Reset your receipt template

You can reset a template to the original version in the Liquid editor:

Steps:

  1. From your Shopify admin, go to Settings > Apps and sales channels.

  2. Click Point of sale.

  3. Click Open sales channel.

  4. Click Settings > Receipt Customization.

  5. Click horizontal menu button > Edit code.

  6. In the Receipts folder, click the Reset the file to default button next to the template that you want to reset.

  7. Click Reset.

Can’t find the answers you’re looking for? We’re here to help.