Cart LinesAPI
The API for interacting with the cart lines.
Anchor to standardapiStandardApi
The base API object provided to purchase
extension targets.
A list of lines containing information about the items the customer intends to purchase.
Anchor to useCartLinesuse Cart Lines()
Returns the current line items for the checkout, and automatically re-renders your component if line items are added, removed, or updated.
Anchor to checkoutapiCheckoutApi
The API object provided to purchase.checkout
extension targets.
Performs an update on the merchandise line items. It resolves when the new line items have been negotiated and results in an update to the value retrieved through the lines
property.
This method will return an error if the cart instruction is false, or the buyer is using an accelerated checkout method, such as Apple Pay, Google Pay, or Meta Pay.
Anchor to useApplyCartLinesChangeuse Apply Cart Lines Change()
Returns a function to mutate the lines
property of checkout.
Anchor to cartlineitemapiCartLineItemApi
The API object provided to cart-line-item
extension targets.
The cart line the extension is attached to. Until version 2023-04
, this property was a .
Anchor to useTargetuse Target()
Returns the cart line the extension is attached to. This hook can only be used by cart-line-item
extension targets. Until version 2023-04
, this hook returned a .
Anchor to useTarget-returnsReturns
CartLine
The line item additional custom attributes.
The details about the cost components attributed to the cart line.
Discounts applied to the cart line.
These line item IDs are not stable at the moment, they might change after any operations on the line items. You should always look up for an updated ID before any call to because you'll need the ID to create a
object.
Sub lines of the merchandise line. If no sub lines are present, this will be an empty array.
The merchandise being purchased.
The quantity of the merchandise being purchased.
Anchor to useCartLineTargetuse Cart Line Target()
Returns the cart line the extension is attached to. This hook can only be used by cart-line-item
extension targets
CartLine
The line item additional custom attributes.
The details about the cost components attributed to the cart line.
Discounts applied to the cart line.
These line item IDs are not stable at the moment, they might change after any operations on the line items. You should always look up for an updated ID before any call to because you'll need the ID to create a
object.
Sub lines of the merchandise line. If no sub lines are present, this will be an empty array.
The merchandise being purchased.
The quantity of the merchandise being purchased.