- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
Order Concepts
In this document, you’ll learn about orders and related concepts
Order Items#
The items purchased in the order are represented by the OrderItem data model. An order can have multiple items.
Item’s Product Details#
The details of the purchased products are represented by the LineItem data model. Not only does a line item hold the details of the product, but also details related to its price, adjustments due to promotions, and taxes.
Order’s Shipping Method#
An order has one or more shipping methods used to handle item shipment.
Each shipping method is represented by the OrderShippingMethod data model that holds its details. The shipping method is linked to the order through the OrderShipping data model.
data Property#
When fulfilling the order, you can use a third-party fulfillment provider that requires additional custom data to be passed along from the order creation process.
The OrderShippingMethod
data model has a data
property. It’s an object used to store custom data relevant later for fulfillment.
The Medusa application passes the data
property to the Fulfillment Module when fulfilling items.
Order Totals#
The order’s total amounts (including tax total, total after an item is returned, etc…) are represented by the OrderSummary data model.
Order Payments#
Payments made on an order, whether they’re capture or refund payments, are recorded as transactions represented by the OrderTransaction data model.
An order can have multiple transactions. The sum of these transactions must be equal to the order summary’s total. Otherwise, there’s an outstanding amount.
Learn more about transactions in this guide.