Set order metafields for non-Plus stores during checkout

We are developing a Checkout UI extension for the purchase.thank-you.block.render target that requires access to an order metafield. This metafield is based on the shipping line item and, therefore, should be set during the final stage of the checkout.

To enable non-Plus stores to utilize this extension, even though they cannot use Functions and Checkout UI extensions on the checkout pages, we are creating this order metafield via the order/create webhook. We then poll for this metafield within the thank-you block extension.

However, this approach leads to delays and necessitates the use of loading indicators, as it operates asynchronously. Therefore, we are looking for an alternative way to set this order metafield during checkout, which will work for non-Plus stores and avoid the displaying delay on the thank-you page.

Would anyone have any suggestions?


Additionally, within the Checkout UI extension API object, there is a suggestion that delivery line items could have metafields attached. We could not find any information about this, but if a third-party carrier-calculated shipping app can set that through a CarrierService API (through a rate response), it would be an ideal solution.