Version 2025-07 is the last API version to support React-based UI components. Later versions use web components, native UI elements with built-in accessibility, better performance, and consistent styling with Shopify's design system. Check out the migration guide to upgrade your extension.
Cart Instructions API
Instructions used to create the checkout.
Anchor to StandardApiStandard Api
The base API object provided to purchase extension targets.
- Anchor to instructionsinstructionsinstructionsStatefulRemoteSubscribable<CartInstructions>StatefulRemoteSubscribable<CartInstructions>requiredrequired
The cart instructions used to create the checkout and possibly limit extension capabilities.
These instructions should be checked prior to performing any actions that may be affected by them.
For example, if you intend to add a discount code via the
method, checkto ensure it's supported in this checkout.CautionCheck cart instructions before calling select APIs, as > some may not be available. See the > Cart Instructions API > for more information.
Caution:Check cart instructions before calling select APIs, as > some may not be available. See the > Cart Instructions API > for more information.
Caution: Check cart instructions before calling select APIs, as > some may not be available. See the > <a href="/docs/api/checkout-ui-extensions/apis/cart-instructions#examples">Cart Instructions API</a> > for more information.
CartInstructions
- attributes
Cart instructions related to cart attributes.
AttributesCartInstructions - delivery
Cart instructions related to delivery.
DeliveryCartInstructions - discounts
Cart instructions related to discounts.
DiscountsCartInstructions - lines
Cart instructions related to cart lines.
CartLinesCartInstructions - metafields
Cart instructions related to metafields.
MetafieldsCartInstructions - notes
Cart instructions related to notes.
NotesCartInstructions
AttributesCartInstructions
- canUpdateAttributes
Indicates whether or not cart attributes can be updated.
boolean
DeliveryCartInstructions
- canSelectCustomAddress
Indicates whether a buyer can select a custom address. When true, this implies extensions can update the delivery address.
boolean
DiscountsCartInstructions
- canUpdateDiscountCodes
Indicates whether or not discount codes can be updated.
boolean
CartLinesCartInstructions
- canAddCartLine
Indicates whether or not new cart lines can be added.
boolean - canRemoveCartLine
Indicates whether or not cart lines can be removed.
boolean - canUpdateCartLine
Indicates whether or not cart lines can be updated.
boolean
MetafieldsCartInstructions
- canDeleteCartMetafield
Indicates whether or not cart metafields can be deleted.
boolean - canSetCartMetafields
Indicates whether or not cart metafields can be added or updated.
boolean
NotesCartInstructions
- canUpdateNote
Indicates whether or not notes can be updated.
boolean
Anchor to useInstructionsuse Instructions()
Returns the cart instructions used to create the checkout and possibly limit extension capabilities.