Skip to main content

order

An order.

Properties

Anchor to
attributes

The attributes on the order.

If there are no attributes on the order, then nil is returned.

Tip

Attributes are collected with the cart.

Example
Output the attributes
<ul>
{% for attribute in order.attributes -%}
<li><strong>{{ attribute.first }}:</strong> {{ attribute.last }}</li>
{%- endfor %}
</ul>
Anchor to
billing_address

The billing address of the order.

Anchor to
cancel_reason
string from a set of values

The reason that the order was cancelled.

Possible valuesDescription
customerCustomer changed/cancelled order
declinedPayment declined
fraudFraudulent order
inventoryItems unavailable
staffStaff error
otherOther
Anchor to
cancel_reason_label

The localized version of the cancellation reason for the order.

Tip

Use this property to output the cancellation reason on the storefront.

Returns true if the order was cancelled. Returns false if not.

Anchor to
cancelled_at

A timestamp for when the order was cancelled.

Tip

Use the date filter to format the timestamp.

Anchor to
cart_level_discount_applications

The discount applications that apply at the order level.

Anchor to
confirmation_number

A randomly generated alpha-numeric identifier for the order that may be shown to the customer instead of the sequential order name. For example, "XPAV284CT", "R50KELTJP" or "35PKUN0UJ". This value isn't guaranteed to be unique.

A timestamp for when the order was created.

Tip

Use the date filter to format the timestamp.

The customer that placed the order.

Anchor to
customer_order_url

The URL for the new order details page.

The new customer accounts includes a list of Buyers Orders and an Order Details View. This liquid function exposes a URL to a specific Orders Details in new customer accounts. Setup process for the new order details page can be found in the help center.

Anchor to
customer_url

The URL for the customer to view the order in their account.

Anchor to
discount_applications

All of the discount applications for the order and its line items.

The email that's associated with the order.

If no email is associated with the order, then nil is returned.

Anchor to
financial_status
string from a set of values

The order's financial status.

Possible values
authorized
expired
paid
partially_paid
partially_refunded
pending
refunded
unpaid
voided
Anchor to
financial_status_label

The localized version of the financial status of the order.

Tip

Use this property to output the financial status on the storefront.

Anchor to
fulfillment_status

The fulfillment status of the order.

Anchor to
fulfillment_status_label
string from a set of values

The localized version of the fulfillment status of the order.

Tip

Use this property to output the fulfillment status on the storefront.

Possible values
complete
fulfilled
partial
restocked
unfulfilled

The ID of the order.

The number of items in the order.

Anchor to
line_items
array of line_item

The line items in the order.

Anchor to
line_items_subtotal_price

The sum of the prices of all of the line items in the order in the currency's subunit, after any line item discounts have been applied.

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

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
metafields

The metafields applied to the order.

Tip

To learn about how to create metafields, refer to Create and manage metafields or visit the Shopify Help Center.

The name of the order.

The note on the order.

If there's no note on the order, then nil is returned.

Anchor to
order_number

The integer representation of the order name.

Anchor to
order_status_url

The URL for the Order status page for the order.

The phone number associated with the order.

Anchor to
pickup_in_store?

Returns true if the order is a store pickup order.

Anchor to
shipping_address

The shipping address of the order.

Anchor to
shipping_methods

The shipping methods for the order.

Anchor to
shipping_price

The shipping price of the order in the currency's subunit.

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

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
subtotal_line_items
array of line_item

The non-tip line items in the order.

Note

These line items are used to calculate the the subtotal price.

Anchor to
subtotal_price

The sum of the prices of the subtotal line items in the currency's subunit, after any line item or cart discounts have been applied.

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

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
tags
array of string

The tags on the order.

The tags are returned in alphabetical order.

Anchor to
tax_lines
array of tax_line

The tax lines on the order.

The total amount of taxes applied to the order in the currency's subunit.

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

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
total_discounts

The total amount of all discounts applied to the order in the currency's subunit.

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

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
total_duties

The sum of all duties applied to the line items in the order in the currency's subunit.

If there are no duties, then nil is returned. The value is output in the customer's local (presentment) currency.

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
total_net_amount

The net amount of the order in the currency's subunit.

The amount is calculated after refunds are applied, so is equal to order.total_price minus order.total_refunded_amount.

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

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
total_price

The total price of the order in the currency's subunit.

Note

The total price is calculated before refunds are applied. Use order.total_net_amount to output the total minus any refunds.

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

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
total_refunded_amount

The total amount that's been refunded from the order in the currency's subunit.

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

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
transactions
array of transaction

The transactions of the order.

Deprecated Properties

Anchor to
discounts
Deprecated

The discounts on the order.

Deprecated

Deprecated because not all discount types and details are captured.

The order.discounts property has been replaced by order.discount_applications.

{
"attributes": {},
"billing_address": {},
"cancel_reason": null,
"cancel_reason_label": null,
"cancelled": false,
"cancelled_at": null,
"cart_level_discount_applications": [],
"confirmation_number": "0YMJHPM8U",
"created_at": "2022-04-29 11:15:46 -0400",
"customer": {},
"customer_order_url": "https://shopify.com/56174706753/account/orders/4295688749121?locale=en&region_country=CA",
"customer_url": "https://polinas-potent-potions.myshopify.com/account/orders/8be02e56c658bcd1f034d28c496fddd9",
"discount_applications": [],
"discounts": null,
"email": "cornelius.potionmaker@gmail.com",
"financial_status": "paid",
"financial_status_label": "Paid",
"fulfillment_status": "partial",
"fulfillment_status_label": "Partial",
"id": 4295688749121,
"item_count": 6,
"line_items": [],
"line_items_subtotal_price": "492.93",
"metafields": {},
"name": "#1001",
"note": null,
"order_number": 1001,
"order_status_url": "https://polinas-potent-potions.myshopify.com/56174706753/orders/8be02e56c658bcd1f034d28c496fddd9/authenticate?key=4f9baf2b8ebd0f75ec73eb9bac6e4519",
"phone": null,
"pickup_in_store?": false,
"shipping_address": {},
"shipping_methods": [],
"shipping_price": "0.00",
"subtotal_line_items": [],
"subtotal_price": "492.93",
"tags": [],
"tax_lines": [],
"tax_price": "0.00",
"total_discounts": "0.00",
"total_duties": null,
"total_net_amount": "492.93",
"total_price": "492.93",
"total_refunded_amount": "0.00",
"transactions": []
}
Was this section helpful?