cart/updateAttributes

Update custom attributes on the cart

Fields

attributesarray required

An array of attribute objects to set on the cart. Each attribute object must contain: {key: "key", value: "value"}

Updates custom attributes on the cart, allowing you to store additional metadata or custom information with the cart. Attributes are key-value pairs that can be used for tracking, personalization, or integration with other systems.

Tapcart.action("cart/updateAttributes", {
  attributes: [
    {
      key: "gift_wrap",
      value: "true"
    },
    {
      key: "gift_message",
      value: "Happy Birthday! From Mom and Dad"
    }
  ]
});