New: Persist cart metafields to orders with `cartToOrderCopyable`

Hey everyone,

We’ve shipped a new capability that lets you carry cart metafield values through to orders automatically. If you’ve been using cart attributes, order notes, or custom post-purchase flows to persist cart data—this is for you.

What’s shipping

As of API version 2026-04, order metafield definitions support a new cartToOrderCopyable capability. When enabled:

  • Cart metafields with a matching namespace and key automatically copy to order metafields at checkout completion
  • The capability is opt-in per definition—you control exactly which cart data persists
  • You can enable it using metafieldDefinitionUpdate

Why we built this

We’ve heard from many of you that persisting cart data to orders has been painful and common workarounds like cart attributes and order notes each have tradeoffs.

With this new capability, cart metafields become our reliable, first-class path to persist onto orders custom context such as age verification, consent records, gift messages, delivery preferences, and even attribution tracking data. They are safer than cart attributes as they support edit and view permissions, and app-reserved namespace to prevent other apps from reading and writing the metafields.

:backhand_index_pointing_right: Learn more about metafield capabilities.

What this means for you

We now recommend using cart metafields instead of cart attributes and checkout metafields for custom cart/checkout data storage.

If you’re using cart attributes, order notes, and checkout metafields, you can start migrating to cart metafields now and take advantage of all the benefits metafields have to offer—permissions, reserved namespace, data type validation, and seamless integration within Shopify’s ecosystem.

Cart metafields are accessible in all APIs for interacting with the buyer journey—from Storefront API, Checkout UI extensions, Functions, and Admin API.

Questions?

I’d love to hear how you’re planning to use this, what we’re missing, or if you run into any edge cases. Drop your thoughts below—happy to dig into specifics.

Gil Greenberg

Product Manager, Checkout

14 Likes

Awesome update @Gil-Shopify

:rocket: :rocket: :rocket: :rocket: :rocket: :rocket: :rocket: :rocket:

1 Like

It looks simple, but it’s huge!

1 Like

Whew finally a cartToken replacement. Thank you!!

It seems small but cart / checkout → order associations needed this.

1 Like

Finally! Great addition. Attributes is great and still has its usecases, but metafields is the way to go :rocket:

1 Like

@curzey What use-cases would you continue using cart attributes over cart metafields now that cart metafields can be ephemeral or persist to the order?

Awesome :hatching_chick:

Any news on exposing cart metafields via liquid? Having Storefront API access is neat, but especially for things like age verification, SSR would be preferred.

1 Like

Will this work with metafields on Draft Orders?
If not, can we get that too? Copy metafield values from Draft Order to Order makes so much sense

1 Like

TY @Gil-Shopify :crown::crown::crown::crown:

Awesome thank you @Gil-Shopify!!

YES! Golden standard and more capabilities. Great update

amazing! this is very much welcomed

Thanks @Gil-Shopify - Should we assume that cart attributes will be deprecated at some time in the medium-term future?

@Alex_Hooper While we are not formally announcing the deprecation of cart attributes, we highly recommend moving to cart metafields given their numerous benefits over cart attributes and the cart note.

1 Like

Thanks @Gil-Shopify , I’ll read between the lines there :face_with_tongue:

thanks for the awesome update @Gil-Shopify

This will help us build much stable theme extensions.

I am hoping these metafields are supported across all the surfaces? theme, checkout, pos, etc?

And you wouldn’t announce deprecation before feature parity, right? … RIGHT? :eyes:

Hey @Gil-Shopify When you say "all APIs for interacting with the buyer journey”, the Cart AJAX API is not supported yet right? So how can use cart metafields within a Liquid storefront currently?