Commerce Layer API, explained — Explore our Data Model.
Orders

Anatomy of an Order

An order consists of several components, including a customer and line items. Merchants or users can manage orders from each market in an organization. In this section, you will learn about the structure of an order in Commerce Layer.
Order resource and its relationships in order management

Anatomy of an order

An order can consist of a customer, line items (SKUs, cost of shipping method, cost of payment method, taxes, or gift cards), a billing address, a shipping address, discount(s) calculated from active promotions, redeemed gift card(s), a payment method, and a payment source type. The price of all components (those with prices) in an order is summed up. The cost of applied discounts and redeemed gift cards will be subtracted from the total amount. This will result in a new and final total. A customer will then checkout the order and pay the new total before shipping commences.

Placing orders

Here is a list of steps showing how an order works, from adding line items to cart to order delivery.

  • A customer visits a sales channel (either as a registered or unregistered customer).
  • The customer selects the item(s) they want to purchase and adds them to the cart (including gift cards).
  • The customer applies available discounts from active promotions (optional).
  • The shopping cart is a draft order.
  • Draft orders are labeled pending when the customer adds their email address.
  • The customer enters their shipping and billing address.
  • The customer selects a shipping and payment method defined for their market.
  • The price of all items in the order is summed up.
  • The customer makes the payment using their preferred payment source type.
  • The customer's payment is authorized and needs to be captured.
  • The order can be canceled before it is captured.
  • Cancelled orders will have their payment authorization voided.
  • The customer's payment is captured.
  • The order becomes approved.
  • Approved orders are shipped and becomes fulfilled.

Ready to get started?