Order properties

The order group of properties contain information related to the store order the document is created from.

Order Information

The order group of properties contains general information of the store order.

order.attributes

Extra information that was added to the order, typically in the shopping cart. Appears in Shopify admin, in the Additional details section of the Order details page.

The array contains entries with name and value key-pairs.

Code
{{ order.attributes }}
Output
Pickup date: 2024-08-14
Engraving name: Sam

Use the following for loop to return all the titles and descriptions of a specific attribute:

Code
{% for name, value in order.attributes %}
  {% if "date" in name %}
    {{ name }}: {{ value }}
  {% endif %}
{% endfor %}
Output
Pickup date: 2024-08-14

Use the name of the entry as an attribute to return its value.

Code
{{ order.attributes.engraving_name }}
Output
Sam

order.billing_address

The mailing address associated with the payment method. This address is an optional field that isn't available on orders that do not require a payment method. Contains the following fields:

  • company
  • street
  • city
  • country
  • region_code
Code
{{ order.billing_address }}
Output
company=None,
street=42 Oxford Street,
city=London,
country=GB,
region_code=ENG

Use one of the field names as an attribute to return the value of only that field.

Code
{{ order.billing_address.city }}
Output
London

order.cancel_reason

The reason why the order was cancelled. Valid values are:

  • customer
  • fraud
  • inventory
  • declined
  • other

Returns an empty string if the order is not cancelled.

Code
{{ order.cancel_reason }}
Output
declined

order.cancelled_time

The autogenerated date and time (ISO 8601 format) when the order was cancelled in the store.

Code
{{ order.cancelled_time }}
Output
2024-08-01 13:21:33+00:00

Use the text attribute or the format_date filter to format the date according to the language of your document.

Code
{{ order.cancelled_time.text }}
Output
Aug 1, 2024

order.cart_token

A unique value to reference the cart that's associated with the order.

Code
{{ order.cart_token }}
Output
68778783ad298f1c80c3bafcddeea

order.created_time

The date and time (ISO 8601 format) when the order was created in the store.

Code
{{ order.created_time }}
Output
2024-07-25 15:16:50+00:00

Use the text attribute or the format_date filter to format the date according to the language of your document.

Code
{{ order.created_time.text }}
Output
Jul 25, 2024

order.currency

The three-letter code (ISO 4217 format) of the store currency.

Code
{{ order.currency }}
Output
EUR

order.customer_locale

The two or three-letter language code (ISO 639-1 or ISO 639-2 format) of the language and locale selected by the customer, optionally followed by a region modifier.

Code
{{ order.customer_locale }}
Output
en_US

order.financial_status

The status of payments associated with the order, set when the order is created. Valid values are:

  • pending
  • authorized
  • partially_paid
  • paid
  • partially_refunded
  • refunded
  • voided
Code
{{ order.financial_status }}
Output
paid

order.fulfillment_status

The order's status in terms of fulfilled line items. Valid values are:

  • fulfilled
  • partial
  • restocked
  • null
Code
{{ order.fulfillment_status }}
Output
fulfilled

order.fulfillment_time

The date and time (ISO 8601 format) when the order was marked as fulfilled in the store.

Code
{{ order.fulfillment_time }}
Output
2024-07-29 16:30:09+00:00

Use the text attribute or the format_date filter to format the date according to the language of your document.

Code
{{ order.fulfillment_time.text }}
Output
Jul 29, 2024

order.id

The unique ID of the order.

Code
{{ order.id }}
Output
6056642773311

order.is_test

If True, the order is a test order.

Code
{{ order.is_test }}
Output
False

order.location_id

The ID of the physical location where the order was processed.

Code
{{ order.location_id }}
Output
654321

order.name

The order name, generated by combining the order.number property with an order prefix and suffix that you can edit in the store settings. This is different from the order.id property.

Code
{{ order.name }}
Output
#1026

order.note

An optional note that you can attach to the order in the store.

Code
{{ order.note }}
Output
Order is a gift

order.number

The order's position in your store's count of orders. The numbers are sequential and start at 1.

Code
{{ order.number }}
Output
26

order.order_number

The integer representation of the order.name property. The numbers are sequential and start at 1001.

For example, for order #1026, order.order_number is 1026.

Code
{{ order.order_number }}
Output
1026

order.order_status_url

The URL that points to the order status web page.

Code
{{ order.order_status_url }}
Output
https://checkout.shopify.com/112233/checkouts/4207896aad57dfb159/thank_you_token?key=753621327b9e8a64789651bf221dfe35

order.presentment_currency

The three-letter code (ISO 4217 format) of the presentment currency that was used to display prices to the customer.

Code
{{ order.presentment_currency }}
Output
GBP

order.processed_time

The date and time (ISO 8601 format) when an order was processed in the store.

Code
{{ order.processed_time }}
Output
2024-07-29 16:30:09+00:00

Use the text attribute or the format_date filter to format the date according to the language of your document.

Code
{{ order.processed_time.text }}
Output
Jul 29, 2024

order.shipping_address

The mailing address to where the order will be shipped. Contains the following fields:

  • company
  • street
  • city
  • country
  • region_code
Code
{{ order.shipping_address }}
Output
company=None,
street=62 Trafalgar Square,
city=London,
country=GB,
region_code=ENG

Use one of the field names as an attribute to return the value of only that field.

Code
{{ order.shipping_address.street }}
Output
62 Trafalgar Square

order.source_name

The source of the checkout from the store.

Code
{{ order.source_name }}
Output
shopify_draft_order

order.subtotal_price

The price of the order in the store currency after discounts but before shipping, duties, taxes, and tips.

Code
{{ order.subtotal_price }}
Output
28.36

order.tags

The tags attached to the order, formatted as a string of comma-separated values.

Code
{{ order.tags }}
Output
ASAP, B2B, New

Use the split filter to split the string into an array.

Code
{{ order.tags | split(separator=', ') }}
Output
['ASAP', 'B2B', 'New']

order.taxes_included

If True, the taxes are included in the order subtotal.

Code
{{ order.taxes_included }}
Output
True

order.token

A unique value to reference the order.

Code
{{ order.token }}
Output
6fd77ffe63681af1d289c1ded88094c3

order.total_discounts

The sum of the discounts applied to the price of the order in the shop currency.

Code
{{ order.total_discounts }}
Output
5.00

order.total_line_items

The sum of all line item prices in the shop currency.

Code
{{ order.total_line_items }}
Output
33.36

order.total_price

The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Cannot be negative.

Code
{{ order.total_price }}
Output
44.61

order.total_refunded

The sum of all the refunds of the order.

Code
{{ order.total_refunded }}
Output
41.77

order.total_tax

The sum of all the taxes applied to the order in the shop currency. Must be positive.

Code
{{ order.total_tax }}
Output
7.44

order.total_tip

The sum of all the tips in the order in the shop currency.

Code
{{ order.total_tip }}
Output
0.00

order.updated_time

The date and time (ISO 8601 format) when the order was last modified.

Code
{{ order.updated_time }}
Output
2024-07-26 12:10:33+00:00

Use the text attribute or the format_date filter to format the date according to the language of your document.

Code
{{ order.updated_time.text }}
Output
Jul 26, 2024

order.weight

The sum of all the line item weights in grams. The sum is not adjusted when items are removed from the order.

Code
{{ order.weight }}
Output
810

Order Customer

The order.customer group of properties contains information about the customer of the related order.

order.customer.created_time

The date and time (ISO 8601 format) when the customer was created.

Code
{{ order.customer.created_time }}
Output
2013-06-27 08:48:27-04:00

Use the text attribute or the format_date filter to format the date according to the language of your document.

Code
{{ order.customer.created_time.text }}
Output
Jun 27, 2013

order.customer.currency

The three-letter code (ISO 4217 format) for the currency that the customer used when they paid for their last order. Defaults to the store currency. Returns the store currency for test orders.

Code
{{ order.customer.currency }}
Output
GBP

order.customer.email

The unique email address of the customer.

Code
{{ order.customer.email }}
Output
george.smith@smithltd.co.uk

order.customer.first_name

The customer's first name.

Code
{{ order.customer.first_name }}
Output
George

order.customer.id

A unique identifier for the customer.

Code
{{ order.customer.id }}
Output
8214991929663

order.customer.last_name

The customer's last name.

Code
{{ order.customer.last_name }}
Output
Smith

order.customer.last_order_name

The order.name of the customer's last order.

Code
{{ order.customer.last_order_name }}
Output
#1026

order.customer.metafields

Additional information attached to the customer, stored as name-value pairs.

Return all the name-value pairs:

Code
{{ order.customer.metafields }}
Output
birthday: 2001-08-05
tier: silver

Use the following for loop to iterate through the metafields:

Code
{% for name, value in order.customer.metafields %}
  {% if "birthday" in name %}
    {{ name }}: {{ value }}
  {% endif %}
{% endfor %}
Output
birthday: 2001-08-05

Use the name as an attribute to return its value:

Code
{{ order.customer.metafields.tier }}
Output
silver

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.customer.phone

The unique phone number (E.164 format) of the customer.

Code
{{ order.customer.phone }}
Output
+44789456123

order.customer.state

The state of the customer's account in your store. Valid values are:

  • disabled: The customer doesn't have an active account. Customer accounts can be disabled from the Shopify admin at any time.
  • invited: The customer has received an email invite to create an account.
  • enabled: The customer has created an account.
  • declined: The customer declined the email invite to create an account.
Code
{{ order.customer.state }}
Output
enabled

order.customer.tags

Tags that you attached to the customer, formatted as a string of comma-separated values. A customer can have up to 250 tags. Each tag can have up to 255 characters.

Code
{{ order.customer.tags }}
Output
Active subscriber, Monthly payment, Premium plan

Use the split filter to split the string into an array.

Code
{{ order.customer.tags | split(separator=', ') }}
Output
['Active subscriber', 'Monthly payment', 'Premium plan']

order.customer.tax_exempt

If True, taxes won't be applied to an order at checkout.

Code
{{ order.customer.tax_exempt }}
Output
False

order.customer.tax_exemptions

Defines whether the customer is exempt from paying specific taxes on their order.

Code
{{ order.customer.tax_exemptions }}
Output
[ "CA_STATUS_CARD_EXEMPTION", "CA_BC_RESELLER_EXEMPTION" ]

order.customer.updated_time

The date and time (ISO 8601 format) when the customer information was last updated.

Code
{{ order.customer.updated_time }}
Output
2013-06-27 08:48:27-04:00

Use the text attribute or the format_date filter to format the date according to the language of your document.

Code
{{ order.customer.updated_time.text }}
Output
Jun 27, 2013

Order Lines

The order.lines array contains all line items of the order.

order.lines

Use the {% for line in order.lines %} loop to iterate through all line items of the order.

{% for line in order.lines %}
  {{ line.quantity }}× {{ line.product.title }} for {{ line.price.text }}
{% endfor %}

order.lines[#].currency

The currency of the order line.

Code
{{ order.lines[0].currency }}
Output
EUR

order.lines[#].discount_applications[#]

The discounts of the order that apply to this line item. This property group contains the same properties as order.discount.applications.

Code
{{ order.line[0].discount_applications[0].value.text }}
Output
15%

order.lines[#].price

The price of the line item in the currency's subunit. This includes any line-level discounts.

The value is output in the customer's local (presentment) currency.

Code
{{ order.lines[0].price }}
Output
25.00

order.lines[#].product.body_html

A description of the product. Supports HTML formatting.

Code
{{ order.lines[0].product.body_html }}
Output
The perfect coffee for any occasion.

order.lines[#].product.handle

A unique handle (human-friendly string) for the product.

Code
{{ order.lines[0].product.handle }}
Output
uganda-coffee-250g

order.lines[#].product.id

The unique store ID of the line item's product.

Code
{{ order.lines[0].product.id }}
Output
9653832876351

order.lines[#].product.metafields

Additional information attached to the product, stored as name-value pairs.

Return all the name-value pairs:

Code
{{ order.lines[0].product.metafields }}
Output
processing_method: washed
brew_type: filter

Use the following for loop to iterate through the metafields:

Code
{% for name, value in order.lines[0].product.metafields %}
  {% if "processing_method" in name %}
    {{ name }}: {{ value }}
  {% endif %}
{% endfor %}
Output
processing_method: washed

Use the name as an attribute to return its value:

Code
{{ order.lines[0].product.metafields.brew_type }}
Output
filter

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.lines[#].product.product_type

The type of the product. A categorization used for filtering and searching products.

Code
{{ order.lines[0].product.product_type }}
Output
Single-origin coffee

order.lines[#].product.tags

The tags associated with the product, in an alphabetical order.

Code
{{ order.lines[0].product.tags }}
Output
Filter coffee, Fruity, Medium cup, Uganda

Use the split filter to split the string into an array.

Code
{{ order.lines[0].product.tags | split(separator=', ') }}
Output
['Filter coffee', 'Fruity', 'Medium cup', 'Uganda']

order.lines[#].product.title

The name of the product.

Code
{{ order.lines[0].product.title }}
Output
Uganda Coffee 250g

order.lines[#].product.vendor

The vendor of the line item product.

Code
{{ order.lines[0].product.vendor }}
Output
Wamala Estate

order.lines[#].properties

An array of custom information for an item that has been added to the cart. Often used to provide product customization options.

Use the following for loop to iterate through the properties:

Code
{% for key, value in order.lines.properties %}
	{{ key }}: {{ value }}
{% endfor %}
Output
custom bag label: Roasted for Black Ltd.

Or use the following to return only one key-value pair:

Code
{{ order.lines[0].properties.custom_bag_label }}
Output
Roasted for Black Ltd.

order.lines[#].quantity

The number of units of one item that were purchased.

Code
{{ order.lines[0].quantity }}
Output
3

order.lines[#].tax_amount

An amount for a tax applied to the item.

Code
order.line[0].tax_amount
Output
4.73

order.lines[#].tax_rate

The tax rate applied to the order to calculate the tax price.

Code
{{ order.lines[0].tax_rate[0] }}
Output
20.00

order.lines[#].total_discount

The total amount of the discount allocated to the line item in the store currency.

Code
{{ order.lines[0].total_discount }}
Output
0

order.lines[#].variant.barcode

The barcode, UPC, or ISBN number for the product variant.

Code
{{ order.lines[0].variant.barcode }}
Output
12345_uganda_light

order.lines[#].variant.compare_price

The original price of the item before an adjustment or a sale.

Code
{{ order.lines[0].variant.compare_price }}
Output
15.00

order.lines[#].variant.country_code_of_origin

The country code (ISO 3166-1 alpha-2 format) of where the item came from.

Code
{{ order.lines[0].variant.country_code_of_origin }}
Output
UG

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.lines[#].variant.country_hs_code

An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries.

Code
{{ order.lines[0].variant.country_hs_code }}
Output
"harmonized_system_code": "1234562222",
"country_code": "US”

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.lines[#].variant.country_of_origin

The full name of the country of origin, converted from order.lines[#].variant.country_code_of_origin.

Code
{{ order.lines[0].variant.country_of_origin }}
Output
Uganda

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.lines[#].variant.hs_code

The country-specific or general Harmonized System code for the inventory item.

Code
order.lines[0].variant.hs_code
Output
0901.21.00

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.lines[#].variant.id

The ID of the line item variant.

Code
{{ order.lines[0].variant.id }}
Output
9653832876351

order.lines[#].variant.metafields

Additional information attached to the customer, stored as name-value pairs.

Return all the name-value pairs:

Code
{{ order.lines[0].variant.metafields }}
Output
packaging: bag
size: 250g

Use the following for loop to iterate through the metafields:

Code
{% for name, value in order.lines[0].variant.metafields %}
  {% if "packaging" in name %}
    {{ name }}: {{ value }}
  {% endif %}
{% endfor %}
Output
packaging: bag

Use the name as an attribute to return its value:

Code
{{ order.lines[#].variant.metafields.size }}
Output
250g

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.lines[#].variant.price

The price of the variant in the currency's subunit. The value is output in the customer's presentment currency.

Code
{{ order.lines[0].variant.price }}
Output
13.00

order.lines[#].variant.province_code_of_origin

The province code (ISO 3166-2 alpha-2 format) of where the item came from. The province code is only used if the shipping provider for the inventory item is Canada Post.

Code
{{ order.lines[0].variant.province_code_of_origin }}
Output
QC

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.lines[#].variant.province_of_origin

The full name of the province of origin, converted from order.lines[#].variant.province_code_of_origin.

Code
{{ order.lines[0].variant.province_of_origin }}
Output
Quebec

Note

This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.

order.lines[#].variant.sku

The SKU of the variant associated with the line item.

Code
{{ order.lines[0].variant.sku }}
Output
1088-1141

order.lines[#].variant.taxable

If True, taxes are charged on the variant.

Code
{{ order.lines[0].variant.taxable }}
Output
False

order.lines[#].variant.title

Display name of the line item variant.

Code
{{ order.lines[0].variant.title }}
Output
Light

order.lines[#].variant.weight

The weight of the item variant in grams.

Code
order.lines[0].variant.weight
Output
270

order.lines[#].product.weight_unit

The unit for the weight of the variant.

Code
{{ order.lines[0].variant.weight_unit }}
Output
g

Order Shipping Lines

The order.shipping_lines array includes properties that contain information about the shipping costs related to the order.

order.shipping_lines

Use the {% for shipping_line in order.shipping_lines %} loop to iterate through all shipping lines of the order.

{% for shipping_line in order.shipping_lines %}
    {{ shipping_line.title }}: {{ shipping_line.price.text }}
{% endfor %}

order.shipping_lines[#].code

The reference to the shipping method.

Code
{{ order.shipping_lines[0].code }}
Output
INT.TP

order.shipping_lines[#].currency

The three-letter code (ISO 4217 format) of the shipping line currency.

Code
{{ order.shipping_lines[0].currency }}
Output
EUR

order.shipping_lines[#].discounted_price

The price of the shipping method in the shop currency, after line-level discounts have been applied. Doesn't reflect cart-level or order-level discounts.

Code
{{ order.shipping_lines[0].discounted_price }}
Output
16.25

Use the .text attribute to render the value formatted as a price.

Code
{{ order.shipping_lines[0].discounted_price.text }}
Output
€16.25

order.shipping_lines[#].price

The price of the selected shipping method in the shop currency. Cannot be negative.

Code
{{ order.shipping_lines[0].price }}
Output
16.25

Use the .text attribute to render the value formatted as a price.

Code
{{ order.shipping_lines[0].price.text }}
Output
€16.25

order.shipping_lines[#].tax_amount

The tax amount of the shipping line in the customer’s presentment (local) currency's subunit.

Code
{{ order.shipping_lines[0].tax_amount }}
Output
2.71

Use the .text attribute to render the value formatted as a price.

Code
{{ order.shipping_lines[0].tax_amount.text }}
Output
€2.71

order.shipping_lines[#].tax_rate

The decimal value of the tax rate of the shipping.

Code
{{ order.shipping_lines[0].tax_rate }}
Output
0.2

Use the .text attribute to render the value formatted as a percentage.

Code
{{ order.shipping_lines[0].tax_rate.text }}
Output
20%

order.shipping_lines[#].title

The title of the shipping method.

Code
{{ order.shipping_lines[0].title }}
Output
Small Packet International Air

Order Tax Lines

The order.tax_lines group includes properties that contain information about the taxes related to the order.

order.tax_lines

Use the {% for tax_line in order.tax_lines %} loop to iterate through all the tax lines of the order.

{% for tax_line in order.tax_lines %}
    {{ tax_line.title }}: {{ tax_line.price.text }}
{% endfor %}

order.tax_lines[#].currency

The three-letter code (ISO 4217 format) of the currency of the tax line.

Code
{{ order.tax_lines[0].currency }}
Output
EUR

order.tax_lines[#].price

The tax amount in the currency's subunit. The value is output in the customer's local (presentment) currency.

Code
{{ order.tax_lines[0].price }}
Output
7.44

Use the .text attribute to render the value formatted as a price.

Code
{{ order.tax_lines[0].price.text }}
Output
€7.44

order.tax_lines[#].rate

The decimal value of the tax rate.

Code
{{ order.tax_lines[0].rate }}
Output
0.20

Use the .text attribute to render the value formatted as a percentage.

Code
{{ order.tax_lines[0].rate.text }}
Output
20 %

order.tax_lines[#].title

The name of the tax.

Code
{{ order.tax_lines[0].title }}
Output
GB VAT

Order Transactions

The order.transactions group contains all transactions of the order.

order.transactions

Use the {% for transaction in order.transaction %} loop to iterate through all transactions of the order.

{% for transaction in order.transactions %} 
    {{ transaction.kind }} transaction: {{ transaction.amount.text }}<br>
{% endfor %}

If you only want to iterate through the sales transactions of the order, you can filter transactions by the value of their kind property using the select filter.

{% for transaction in order.transactions | select(property='kind', value='sale') %} 
    {{ transaction.kind }} transaction: {{ transaction.amount.text }}<br>
{% endfor %}

order.transactions[#].amount

The amount of the transaction in the customer's local currency.

Code
{{ order.transactions[0].amount }}
Output
44.61

Use the .text attribute to render the value formatted as a price.

Code
{{ order.transactions[0].amount.text }}
Output
£44.61

order.transactions[#].authorization

The authorization code associated with the transaction.

Code
{{ order.transactions[0].authorization }}
Output
ch_1AtJu6CktlpKSclI4zjeQb2t

order.transactions[#].created_time

The autogenerated datetime (ISO 8601 format) when the transaction related to the order was created.

Code
{{ order.transactions[0].created_time }}
Output
2024-8-4 08:48:27+00:00

Use the text attribute or the format_date filter to render the value formatted as a date in a country-specific format.

Code
{{ order.transactions[0].created_time.text }}
Output
Aug. 4, 2024

order.transactions[#].credit_card_company

The name of the company that issued the customer's payment card.

Code
{{ order.transactions[0].credit_card_company }}
Output
Visa

order.transactions[#].credit_card_number

The customer's payment card number, with most of the leading digits redacted.

Code
{{ order.transactions[0].credit_card_number }}
Output
•••• •••• •••• 4242

order.transactions[#].currency

The three-letter code (ISO 4217 format) of the currency used for the payment.

Code
{{ order.transactions[0].currency }}
Output
GBP

order.transactions[#].gateway

The handleized name of the payment gateway used for the transaction. A list of gateways can be found on Shopify's payment gateways page.

Code
{{ order.transactions[0].gateway }}
Output
shopify_payments

order.transactions[#].id

The ID of the transaction.

Code
{{ order.transactions[0].id }}
Output
5432242176065

order.transactions[#].kind

The type of the transaction. Valid values are:

  • authorization: An amount reserved against the cardholder's funding source. Money does not change hands until the authorization is captured.
  • sale: An authorization and capture performed together in a single step.
  • capture: A transfer of the money that was reserved during the authorization stage.
  • void: A cancellation of a pending authorization or capture.
  • refund: A partial or full return of captured funds to the cardholder. A refund can happen only after a capture is processed.
Code
{{ order.transactions[0].kind }}
Output
sale

order.transactions[#].message

A message generated by the payment gateway with additional information about why the transaction succeeded or failed.

Code
{{ order.transactions[0].message }}
Output
Payment marked as received

order.transactions[#].receipt

A transaction receipt attached to the transaction by the payment gateway, in the form of a dictionary data type. The key-value pairs of this property differ depending on the gateway you used for the processing of the payment.

Code
{{ order.transactions[0].receipt }}
Output
value: 44.61,
status: success

order.transactions[#].status

The status of the transaction. Valid values are:

  • success
  • pending
  • failure
  • error
Code
{{ order.transactions[0].status }}
Output
success

Order Discounts

The order.discounts array contains information about the discounts applied to the order.

Use the following for loop to iterate through the discounts:

{% for discount in order.discounts %}
  {{ discount.code }}: -{{ discount.amount.text }}
{% endfor %}

The order.discount_applications array contains information about the intent of the discounts applied to the order.

Use the following for loop to iterate through the discounts:

{% for discount_application in order.discount_applications %}
  {{ discount_application.title }}: {{ discount_application.value.text }}
{% endfor %}

order.discounts[#].amount

The calculated amount that was deducted from the order.total_price.

Code
{{ order.discounts[0].amount }}
Output
30.00

Use the .text attribute to render the value formatted as a price.

Code
{{ order.discounts[0].amount.text }}
Output
€30.00

order.discounts[#].code

When the associated discount application is of type code, this property returns the discount code that was entered at checkout. Otherwise this property returns the title of the discount that was applied.

Code
{{ order.discounts[0].code }}
Output
SUMMER15

order.discounts[#].type

The type of discount. Valid values are:

  • fixed_amount: Applies the order.discount[#].amountas a unit of the store's currency. For example, if the amount is 30 and the store's currency is USD, then 30 USD is deducted from the order total when the discount is applied.
  • percentage: Applies a discount of the order.discount[#].amount as a percentage of the order total.
  • shipping: Applies a free shipping discount on orders that have a shipping rate less than or equal to the order.discount[#].amount. For example, if the amount is 30, then the discount will give the customer free shipping for any shipping rate that is less than or equal to $30.
Code
{{ order.discounts[0].type }}
Output
percentage

order.discount_applications[#].allocation_method

The method by which the discount application value has been allocated to entitled lines. Valid values are:

  • across: The value is spread across all entitled lines.
  • each: The value is applied onto every entitled line.
  • one: The value is applied onto a single line.
Code
{{ order.discount_applications[0].allocation_method }}
Output
across

order.discount_applications[#].code

The discount code that was used to apply the discount. Available only for discount code applications.

Code
{{ order.discount_applications[0].code }}
Output
SUMMERSALE

order.discount_applications[#].description

The description of the discount application, as defined by the storeowner or the Shopify Script. Available only for manual and script discount applications.

Code
{{ order.discount_applications[0].description }}
Output
Loyalty

order.discount_applications[#].target_selection

The lines on the order, of the type defined by the order.discount_applications[#].target_type that the discount is allocated over. Valid values are:

  • all: The discount is allocated onto all lines.
  • entitled: The discount is allocated only onto lines it is entitled for.
  • explicit: The discount is allocated onto explicitly selected lines.
Code
{{ order.discount_applications[0].target_selection }}
Output
entitled

order.discount_applications[#].target_type

The type of line on the order that the discount is applicable on. Valid values are:

  • line_item: The discount applies to line items.
  • shipping_line: The discount applies to shipping lines.
Code
{{ order.discount_applications[0].target_type }}
Output
line_item

order.discount_applications[#].title

The title of the discount application, as defined by the storeowner. Available only for manual discount applications.

Code
{{ order.discount_applications[0].title }}
Output
Spring sale

order.discount_applications[#].type

The discount application type. Valid values are:

  • automatic: The discount was applied automatically, such as by a Buy X Get Y automatic discount.
  • discount_code: The discount was applied by a discount code.
  • manual: The discount was manually applied by the storeowner (for example, by using an app or creating a draft order).
  • script: The discount was applied by a Shopify Script.
Code
{{ order.discount_applications[0].type }}
Output
manual

order.discount_applications[#].value

How this value is interpreted depends on the order.discount_applications[#].value_type.

If the order.discount_applications[#].value_type is percentage and the intent was to apply a 20% discount, then the order.discount_applications.value will be 20.0.

If the order.discount_applications[#].value_type is fixed and the intent was to apply a $15 discount, then the order.discount_applications.value will be 15.0.

Code
{{ order.discount_applications[0].value }}
Output
5.0

Use the .text attribute to render the value formatted as a price or percentage.

Code
{{ order.discount_applications[0].value.text }}
Output
€5.00

order.discount_applications[#].value_type

The type of the value. Valid values are:

  • fixed_amount: A fixed amount discount value in the currency of the order.
  • percentage: A percentage discount value.
Code
{{ order.discount_applications[0].value_type }}
Output
fixed_amount

Order Payment Terms

The order.payment_terms array contains information about the payment terms of the order.

order.payment_terms.payment_terms_type

The type of selected payment terms template for the order.

Code
{{ order.payment_terms.payment_terms_type }}
Output
net

order.payment_terms.payment_terms_name

The name of the selected payment terms template for the order.

Code
{{ order.payment_terms.payment_terms_name }}
Output
Net 7

order.payment_terms.due_in_days

The number of days between the invoice date and due date that is defined in the selected payment terms template.

Code
{{ order.payment_terms.due_in_days }}
Output
7

order.payment_terms.due_at

The calculated date and time when the payment is due.

Code
{{ order.payment_terms.due_at }}
Output
2024-08-01T15:16:50Z

Use the text attribute or the format_date filter to render the value formatted as a date in a country-specific format.

Code
{{ order.payment_terms.due_at.text }}
Output
Aug. 01, 2024