Order Concepts
In this document, you’ll learn about orders and their general attributes.
Order Data Model
An order represents a customer purchase in your store. The Order
data model holds the information about that purchase.
Order Items
The items purchased in the order are represented by the OrderItem
data model. An order can have multiple items.
Learn more about order items in this guide.
Order’s Shipping Method
An order has one or more shipping methods used to handle item shipment. Each shipping method is represented by the ShippingMethod
data model that holds its details.
data Attribute
When fulfilling the order, you may use a third-party fulfillment provider that requires additional custom data to be passed along from the order creation process.
The ShippingMethod
data model has a data
attribute. It’s an object used to store custom data relevant later for fulfillment.
In the Medusa application, the data
is passed 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. An order can have multiple summaries.
Order Payments
Payments made on an order, whether they’re capture or refund payments, are recorded as transactions represented by the Transaction
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.