Skip to main content

Order

An Order is created whenever a Customer adds an item to the cart. It contains all the information required to fulfill an order: which ProductVariants in what quantities; the shipping address and price; any applicable promotions; payments etc.

An Order exists in a well-defined state according to the OrderState type. A state machine is used to govern the transition from one state to another.

Signature

constructor

method(input?: DeepPartial<Order>) => Order

type

propertyOrderType

sellerOrders

propertyOrder[]

aggregateOrder

propertyOrder

aggregateOrderId

propertyID

code

propertystring

A unique code for the Order, generated according to the OrderCodeStrategy. This should be used as an order reference for Customers, rather than the Order's id.

state

propertyOrderState

active

propertyboolean

Whether the Order is considered "active", meaning that the Customer can still make changes to it and has not yet completed the checkout process. This is governed by the OrderPlacedStrategy.

orderPlacedAt

propertyDate

The date & time that the Order was placed, i.e. the Customer completed the checkout and the Order is no longer "active". This is governed by the OrderPlacedStrategy.

customer

propertyCustomer

customerId

propertyID

lines

propertyOrderLine[]

surcharges

propertySurcharge[]

Surcharges are arbitrary modifications to the Order total which are neither ProductVariants nor discounts resulting from applied Promotions. For example, one-off discounts based on customer interaction, or surcharges based on payment methods.

couponCodes

propertystring[]

An array of all coupon codes applied to the Order.

promotions

propertyPromotion[]

Promotions applied to the order. Only gets populated after the payment process has completed, i.e. the Order is no longer active.

shippingAddress

propertyOrderAddress

billingAddress

propertyOrderAddress

payments

propertyPayment[]

fulfillments

propertyFulfillment[]

currencyCode

propertyCurrencyCode

customFields

propertyCustomOrderFields

taxZoneId

propertyID

channels

propertyChannel[]

modifications

subTotal

propertynumber

The subTotal is the total of all OrderLines in the Order. This figure also includes any Order-level discounts which have been prorated (proportionally distributed) amongst the OrderItems. To get a total of all OrderLines which does not account for prorated discounts, use the sum of OrderLine's discountedLinePrice values.

subTotalWithTax

propertynumber

Same as subTotal, but inclusive of tax.

shippingLines

propertyShippingLine[]

The shipping charges applied to this order.

shipping

propertynumber

The total of all the shippingLines.

shippingWithTax

propertynumber

discounts

propertyDiscount[]

total

propertynumber

Equal to subTotal plus shipping

totalWithTax

propertynumber

The final payable amount. Equal to subTotalWithTax plus shippingWithTax.

totalQuantity

propertynumber

taxSummary

propertyOrderTaxSummary[]

A summary of the taxes being applied to this Order.

Was this chapter helpful?
Report Issue
Edited Feb 25, 2026ยทEdit this page