cart/remove

Remove products to your cart

Fields

lineItems • [ lineItems ]required

An array of lineItem objects to be added to cart

LineItems Fields

variantIdstring required

The Shopify ID of the variant to remove

quantitynumber

How many to remove from cart. If value is left null it will remove all quantity of the variant from cart


Adds one or more products to the shopping cart. This action handles cart creation if no cart exists, processes line items with proper validation, and updates the cart state.

Basic usage - Removing all quantities of a line item

Tapcart.action("cart/remove", {
  lineItems: [
    {
      variantId: "gid://shopify/ProductVariant/12345678"
      // No quantity = remove completely
    }
  ]
});

Basic usage - Removing 1 quantity from a line item

Tapcart.action("cart/remove", {
  lineItems: [
    {
      variantId: "gid://shopify/ProductVariant/12345678"
      // No quantity = remove completely
    }
  ]
});