The order
group of properties contain information related to the store order the document is created from.
The order
group of properties contains general information of the store order.
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.
Use the following for
loop to return all the titles and descriptions of a specific attribute:
Use the name of the entry as an attribute to return its value.
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
Use one of the field names as an attribute to return the value of only that field.
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.
The autogenerated date and time (ISO 8601 format) when the order was cancelled in the store.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
The date and time (ISO 8601 format) when the order was created in the store.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
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.
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
The order's status in terms of fulfilled line items. Valid values are:
fulfilled
partial
restocked
null
The date and time (ISO 8601 format) when the order was marked as fulfilled in the store.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
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.
The order's position in your store's count of orders. The numbers are sequential and start at 1.
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
.
The three-letter code (ISO 4217 format) of the presentment currency that was used to display prices to the customer.
The date and time (ISO 8601 format) when an order was processed in the store.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
The mailing address to where the order will be shipped. Contains the following fields:
company
street
city
country
region_code
Use one of the field names as an attribute to return the value of only that field.
The price of the order in the store currency after discounts but before shipping, duties, taxes, and tips.
The tags attached to the order, formatted as a string of comma-separated values.
Use the split
filter to split the string into an array.
The sum of the discounts applied to the price of the order in the shop currency.
The sum of all line item prices, discounts, shipping, taxes, and tips in the shop currency. Cannot be negative.
The sum of all the taxes applied to the order in the shop currency. Must be positive.
The date and time (ISO 8601 format) when the order was last modified.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
The sum of all the line item weights in grams. The sum is not adjusted when items are removed from the order.
The order.customer
group of properties contains information about the customer of the related order.
The date and time (ISO 8601 format) when the customer was created.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
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.
Additional information attached to the customer, stored as name-value pairs.
Return all the name-value pairs:
Use the following for
loop to iterate through the metafields:
Use the name as an attribute to return its value:
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
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.
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.
Use the split
filter to split the string into an array.
Defines whether the customer is exempt from paying specific taxes on their order.
The date and time (ISO 8601 format) when the customer information was last updated.
Use the text
attribute or the format_date
filter to format the date according to the language of your document.
The order.lines
array contains all line items of the order.
Use the {% for line in order.lines %}
loop to iterate through all line items of the order.
The discounts of the order that apply to this line item. This property group contains the same properties as order.discount.applications
.
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.
Additional information attached to the product, stored as name-value pairs.
Return all the name-value pairs:
Use the following for
loop to iterate through the metafields:
Use the name as an attribute to return its value:
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
The type of the product. A categorization used for filtering and searching products.
The tags associated with the product, in an alphabetical order.
Use the split
filter to split the string into an array.
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:
Or use the following to return only one key-value pair:
The total amount of the discount allocated to the line item in the store currency.
The original price of the item before an adjustment or a sale.
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
An array of country-specific Harmonized System (HS) codes for the item. Used to determine duties when shipping the inventory item to certain countries.
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
The full name of the country of origin, converted from order.lines[#].variant.country_code_of_origin
.
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
Additional information attached to the customer, stored as name-value pairs.
Return all the name-value pairs:
Use the following for
loop to iterate through the metafields:
Use the name as an attribute to return its value:
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
The price of the variant in the currency's subunit. The value is output in the customer's presentment currency.
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.
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
The full name of the province of origin, converted from order.lines[#].variant.province_code_of_origin
.
Note
This property is only available in our Professional or higher plans. To enable it for your account, please contact our support.
The order.shipping_lines
array includes properties that contain information about the shipping costs related to the order.
Use the {% for shipping_line in order.shipping_lines %}
loop to iterate through all shipping lines of the order.
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.
Use the .text
attribute to render the value formatted as a price.
The price of the selected shipping method in the shop currency. Cannot be negative.
Use the .text
attribute to render the value formatted as a price.
The tax amount of the shipping line in the customer’s presentment (local) currency's subunit.
Use the .text
attribute to render the value formatted as a price.
The decimal value of the tax rate of the shipping.
Use the .text
attribute to render the value formatted as a percentage.
The order.tax_lines
group includes properties that contain information about the taxes related to the order.
Use the {% for tax_line in order.tax_lines %}
loop to
iterate through all the tax lines of the order.
The tax amount in the currency's subunit. The value is output in the customer's local (presentment) currency.
Use the .text
attribute to render the value formatted as a price.
The decimal value of the tax rate.
Use the .text
attribute to render the value formatted as a percentage.
The order.transactions
group contains all transactions of the order.
Use the {% for transaction in order.transaction %}
loop to iterate through all transactions of the order.
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.
The amount of the transaction in the customer's local currency.
Use the .text
attribute to render the value formatted as a price.
The autogenerated datetime (ISO 8601 format) when the transaction related to the order was created.
Use the text
attribute or the format_date
filter to render the value formatted as a date in a country-specific format.
The name of the company that issued the customer's payment card.
The customer's payment card number, with most of the leading digits redacted.
The handleized name of the payment gateway used for the transaction. A list of gateways can be found on Shopify's payment gateways page.
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.
A message generated by the payment gateway with additional information about why the transaction succeeded or failed.
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.
The status of the transaction. Valid values are:
success
pending
failure
error
The order.discounts
array contains information about the discounts applied to the order.
Use the following for loop to iterate through the discounts:
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:
The calculated amount that was deducted from the order.total_price
.
Use the .text
attribute to render the value formatted as a price.
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.
The type of discount. Valid values are:
fixed_amount
: Applies theorder.discount[#].amount
as 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 theorder.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 theorder.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.
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.
The discount code that was used to apply the discount. Available only for discount code applications.
The description of the discount application, as defined by the storeowner or the Shopify Script. Available only for manual and script discount applications.
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.
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.
The title of the discount application, as defined by the storeowner. Available only for manual discount applications.
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.
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
.
Use the .text
attribute to render the value formatted as a price or percentage.
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.
The order.payment_terms
array contains information about the payment terms of the order.
The type of selected payment terms template for the order.
The name of the selected payment terms template for the order.
The number of days between the invoice date and due date that is defined in the selected payment terms template.
The calculated date and time when the payment is due.
Use the text
attribute or the format_date
filter to render the value formatted as a date in a country-specific format.