How to associate a cart with an order?

Topic summary

Associating a cart to its resulting order after moving to Checkout UI Extensions is blocked by missing identifiers: the Admin Order GraphQL API has no cartToken, and REST cart_token/checkout_token are deprecated or slated for removal.

Initial guidance suggested using checkoutToken (a checkout identifier) or the attributes API. However, checkoutToken is deprecated on orders, so apps cannot rely on it long-term.

Multiple developers report their apps depend on checkoutToken to link Thank You/checkout data to orders and request a stable replacement. Concern is raised that removing it without an alternative could impact many stores.

Current recommended workaround: write cart attributes during checkout and persist them to order metafields during checkout. Alternatives depend on stack: cart attributes (Online Store), cart metafields (headless), or direct order metafields.

Open issue: scenarios like express checkout/“Pay Now” may bypass carts or discard attributes, undermining the workaround.

Status: No official replacement identifier announced. Feedback has been escalated; the suggested path is attributes → order metafields, but concerns about deprecation impact and express checkout remain unresolved.

Summarized with AI on December 25. AI used: gpt-5.

Hey SBD, what about cases where cart attributes are discarded - like express checkout and “Pay Now” functionality where there is no cart?