Learn how Carts hold what a customer wants to buy, how Orders record the purchase, and how both fit into checkout.
A purchase starts with what a customer wants to buy and ends with a record of what they bought. A Cart holds the items while the customer shops and goes through checkout. An Order records the purchase when the customer completes checkout, and a Payment records how the customer paid for it. A business uses Carts and Orders to let customers shop with or without an account, keep prices stable during checkout, create Orders from Carts and Quotes, and correct Orders after purchase. This area covers Carts, Line Items, Orders, and Payments, and how Orders are created and updated.
You can work with Carts and Orders in the Merchant Center or with the APIs:
Key concepts
Carts
For example, a customer adds a jacket and a scarf to a Cart in a webshop. When the customer checks out, the Cart is ordered and the business receives an Order for the two items.
- In the Merchant Center: Search and filter Carts
- For developers: Carts in the Carts and Orders APIs overview
Line Items
For example, a customer adds a pair of shoes to a Cart. The business changes the Product's description the next day. The Line Item still shows the data from the time the customer added the shoes, unless the Cart is explicitly recalculated with updated Product data.
- For developers: Line Items in the Carts and Orders APIs overview
Custom Line Items
A Custom Line Item is a generic item that isn't associated with a Product Variant. A business uses it to sell services or virtual goods that don't need inventory tracking, such as additional fees or vouchers.
For example, a business adds a gift-wrapping fee to a Cart as a Custom Line Item, with its own price and tax.
- For developers: Custom Line Items in the Carts and Orders APIs overview
Guest checkout
For example, a visitor adds a lamp to a Cart in the webshop without signing in. At checkout, the visitor signs in, and the lamp is in the visitor's Cart.
- For developers: Guest checkout in the Carts and Orders APIs overview
Global and Store-specific Customers
For example, a customer who registered in a Store for Germany can only shop in that Store, while a global Customer can shop in any Store.
Frozen Carts
Freezing a Cart keeps its prices from changing. A business freezes a Cart during checkout to make sure the customer pays the price they saw in their Cart, even if prices or promotions change before the customer places the Order.
A business can freeze a Cart in two ways:
- A soft freeze keeps the prices of the Line Items as they were. If the Price of a Line Item is deleted, the Line Item is removed from the Cart. New Cart Discounts aren't applied to the Cart. The Cart can still be ordered or unfrozen.
- A hard freeze does everything a soft freeze does, and also keeps the Discounts, Discount Codes, and Shipping Method of the Cart fixed.
A frozen Cart isn't merged when a Customer signs in. If a Discount must be removed or a Tax Rate must change, ordering the frozen Cart fails.
For example, a customer starts the payment for a Cart, and the business starts a sale at the same time. The business froze the Cart at the start of the payment, so the customer still pays the price they saw.
- For developers: Frozen Carts in the Carts and Orders APIs overview
Locked Carts
Locking a Cart blocks all updates to it. Freezing is different because it only blocks updates that affect the price of the Cart. A business locks a Cart for assisted selling, when a support agent needs exclusive access to a Cart while they work on it. Only applications that have been granted the permission to manage locked Carts can lock, update, or unlock a Cart.
In the Merchant Center, the edit mode of the Cart list locks the Cart to the Customer and releases it when the person editing leaves the edit mode.
For example, a customer calls support to get help with a Cart. The support agent locks the Cart so that nobody else, including the customer, changes it while the agent updates it.
- In the Merchant Center: Edit a Cart
- For developers: Locked Carts in the Carts and Orders APIs overview
Cart merge
A Cart merge combines an anonymous Cart with a Customer's existing active Cart, so that a visitor who signs in doesn't lose the items they selected. A merge can happen automatically during sign-up or sign-in with the internal OAuth service, or manually at any other time.
Two Carts are eligible for a merge when they use the same currency and belong to the same Store or Business Unit if either has one. If the anonymous Cart has Direct Discounts, both Carts must also use the same setting for whether Direct Discounts can be used together with Cart Discounts.
Items that match in both Carts are merged using the higher quantity of the two. Other items are added as separate items. The merge works in one of two modes. The default is to merge the anonymous Cart into the Customer's most recently modified active Cart. The other mode is to use the anonymous Cart as the Customer's new active Cart without merging items.
For example, a visitor adds a lamp to an anonymous Cart, then signs in to an account that already has a Cart with a rug. Merging the Carts gives the customer one Cart with the lamp and the rug.
- For developers: Cart merge in the Carts and Orders APIs overview
Cart lifetime
By default, a Cart is deleted 90 days after its last change. A business can change this period in the Project settings and for individual Carts. Changing the setting in the Project doesn't change existing Carts. Carts that were created from a Quote or a Recurring Order aren't deleted automatically.
For example, a customer leaves a Cart for three months without changing it. With the default setting, the Cart is deleted, and the customer starts a new Cart on the next visit.
- For developers: Cart lifetime in the Carts and Orders APIs overview
Taxes
For example, a Cart for a customer in Germany shows the German VAT only after the customer enters the shipping address.
- In the Merchant Center: Manage taxes
- For developers: Taxes in the Carts and Orders APIs overview
Price precision and rounding
Prices can be stored in cent precision or high precision. When a Cart calculates the net, gross, and tax amounts, it rounds them. Relative Discounts round in favor of the customer: half-way amounts round down.
For example, when a relative Discount results in an amount that lies exactly half-way between two cents, the Cart rounds down, which is better for the customer.
Cash or denomination rounding
In some countries, prices must be rounded to the nearest 5 or 10 units, because smaller coin denominations were withdrawn from circulation. For example:
- In Hungary, offline cash payments are rounded to the nearest 5 forints, while online prices can use any amount.
- In Switzerland, both offline and online prices are rounded to the nearest 5 centimes. Amounts ending in 1, 2, 6, or 7 round down, and amounts ending in 3, 4, 8, or 9 round up. For example, CHF 10.42 is rounded to CHF 10.40, and CHF 10.43 is rounded to CHF 10.45.
Inventory
Shopping Lists
A Shopping List is a list of items that a customer wants to keep for later, such as a wishlist. It can hold Products and items that the customer describes in free text. A customer can add the Products of a Shopping List to a Cart; items described in free text aren't added. When a visitor signs up or signs in after shopping in an anonymous session, the Shopping Lists of that session move to the Customer.
For example, a customer saves three pairs of shoes in a Shopping List, then later adds the pair they chose to a Cart.
- In the Merchant Center: Manage Shopping Lists
- For developers: Shopping Lists in the Carts and Orders APIs overview
Orders
An Order is a snapshot of a transaction between a customer and a business. It serves as a durable record of the transaction. It includes details such as the selected items, prices, customer information, the shipping address and billing address, selected Shipping Methods, payment information, and Order state. An Order doesn't manage the full post-purchase lifecycle, such as fulfillment, returns, or refunds, but it is the foundation on which those processes can be built or integrated.
For example, when a customer completes checkout, the business receives an Order with the items, prices, addresses, and payment information of the purchase.
- In the Merchant Center: Export Orders
Create an Order
A business creates an Order in one of three ways: from a Cart, from a Quote, or by using Order Import.
- In the Merchant Center: Create an Order or Copy an Order
- For developers: Create an Order in the Carts and Orders APIs overview
From a Cart
Creating an Order from a Cart is the most common method. A business uses it for typical customer purchases during checkout. The Order receives a copy of the following information from the Cart:
- Line Items and Custom Line Items, with their prices and any associated Custom Fields
- Shipping and billing addresses
- Customer information
- The Custom Fields of the Cart
- The selected Shipping Method
- Payment information
- Discount Codes
- Direct Discounts, and whether they can be used together with Cart Discounts
- Tax settings
- The inventory mode
- The origin of the Cart: a customer, a merchant, a Quote, or a Recurring Order
- Free gift items that the customer removed
- A reference to the Cart
- Any associated Store or Business Unit
For example, a customer pays for a Cart in the webshop, and the business receives an Order that contains the same items, prices, and addresses as the Cart.
From a Quote
For example, a buyer agrees to a Quote for 200 chairs at a negotiated price, and the business creates an Order from the pending Quote.
Using Order Import
Order Import lets a business import existing Orders from external systems or other Projects. A business uses it to migrate from a legacy system or to consolidate Orders from different sources. Order Import requires all Order data, and the data must follow the Order data model.
- In the Merchant Center: Import Orders
Update an Order
An Order is a legally binding purchase agreement between the business and the customer. A business should therefore consider changes to it carefully.
Shipping addresses, including the country and state, identify the applicable Shipping Methods and shipping rates of an Order. A business can update a shipping address with a direct update or with an Order Edit. However, Shipping Methods and shipping rates are only reevaluated when the change is made with an Order Edit.
For example, a customer entered a wrong street name. The business corrects the shipping address so that the goods reach the customer.
- In the Merchant Center: Edit an Order
- For developers: Overview of update actions for Cart, Order, and Order Edit
Non-financial changes
A business uses a direct update to change an Order when no financial change occurs. For example, changes to:
- The Order number, state, or locale
- The customer's email address or billing address
- Shipping information, such as addresses, that doesn't require recalculation of the Shipping Method and shipping rates
- Payment information
- Deliveries and returns
- Any other change that doesn't affect the Order total
Financial changes
A business uses an Order Edit when an update to an Order results in a financial change. For example, changes to:
- Line Items and Custom Line Items, such as their quantity
- Shipping information, such as addresses, that requires recalculation of the Shipping Method and shipping rates
- Discounts
- Any other change that affects the Order total
An Order Edit is a staging area for changes. A business can preview what the Order looks like with the changes before it applies them, and the Order Edit keeps an audit trail of the amendment. Once applied, any additional changes need a new Order Edit. In the same Order Edit, a business can also change non-financial properties. For example, it can update a customer's email address together with changes that affect the total price.
- For developers: Order Edits in the Carts and Orders APIs overview
Order Search BETA
Order Search lets merchants and back-office teams search a large number of Orders in a Project. It isn't meant for showing a customer's order history in a storefront. A search returns the IDs and versions of the matching Orders, not the Order data itself. A business then fetches the Orders by their IDs. The search index can be out of date, and the versions let a business detect that.
Order Search is off by default. A business activates it with the Project API, or in the Merchant Center by indexing the Orders, which only Administrators can do.
For example, an order manager searches for all Orders of a customer from the last quarter and opens the matching Orders.
- In the Merchant Center: Search for Orders
- For developers: Order Search in the Carts and Orders APIs overview
Payments
For example, a customer pays with a credit card at checkout. The Payment holds the PSP, the payment method, and the transactions for the card payment.
- For developers: Payments in the Carts and Orders APIs overview
Payment Methods
A Payment Method holds the PSP information and the actual payment method that a customer used, such as a credit card or a direct debit. A business uses a Payment Method to connect with external PSPs.
For example, a customer's saved credit card is a Payment Method that the customer can use again for later purchases.
- For developers: Payment Methods in the Carts and Orders APIs overview
How the concepts relate
The following diagram shows how Carts, Orders, and Payments relate to each other and to the people and places they belong to.
A Customer or an anonymous visitor has Carts, and a Cart holds Line Items. A customer can add the Products of a Shopping List to a Cart. When the Cart is ordered, it becomes an Order, and a pending Quote can also be used to create an Order. A Payment records how the customer pays for an Order. A Cart and its Order can belong to a Store or a Business Unit.
Lifecycle and states
Cart states
The following diagram shows the states of a Cart.
An active Cart can be updated and ordered, and a Customer can have more than one active Cart. A frozen Cart blocks updates that affect prices, and it can still be ordered or unfrozen. A Cart is merged when a visitor's anonymous Cart is merged into a Customer's Cart at sign-in, and an ordered Cart was used to create an Order. No further operations are allowed on a merged or an ordered Cart.
Order, shipment, and payment states
An Order has a state, a shipment state, and a payment state. They describe different parts of the Order, and a business sets and uses them to track the Order. A new Order is open by default, and an Order can be confirmed, complete, or cancelled. A shipment can be, for example, ready, shipped, or delivered, and a payment can be, for example, pending, paid, or credit owed.
For example, a new Order is open, the customer has paid, and the goods are ready to ship. The order state is open, the payment state is paid, and the shipment state is ready.
- For developers: Lifecycle and workflow actions in the overview of update actions
Selection and precedence rules
Tax Rate selection by shipping address
A Cart selects the Tax Rate of an item by comparing the shipping address with the countries and states of the Tax Rates in the Tax Category of the item. A Tax Rate applies in the following cases:
- The country of the shipping address and the country of the Tax Rate are the same, and neither has a state.
- The countries are the same, and the state of the shipping address and the state of the Tax Rate are the same.
For example, a Tax Category has a Tax Rate for Germany without a state. A shipping address in Germany without a state gets that Tax Rate. A shipping address in Germany with a state doesn't, unless the Tax Rate is also set for that state.
- For developers: Tax Rate selection in the Carts and Orders APIs overview
Direct update or Order Edit
The following diagram shows how to choose between a direct update and an Order Edit to change an Order.
A direct update changes only the Order. It doesn't recalculate taxes, and it doesn't change the Cart that the Order was created from. If a change affects the Order total, or taxes or shipping rates must be recalculated, an Order Edit is the only option. An Order Edit also gives the business an audit trail of the amendment.