Unable to access shop metafield data on checkout ui extension

Topic summary

A developer is unable to retrieve shop metafield data (namespace: “checkout_pro”, key: “form_builder”) on a Shopify checkout UI extension’s thank-you page. The metafield is accessible via GraphQL Admin UI but returns an empty array when queried through the extension.

Attempted solutions:

  • Multiple hook variations: useAppMetafields(), useMetafields(), with and without parameters
  • Confirmed extension.toml is properly configured with namespace, key, and owner_type="SHOP"
  • Other hooks (useSettings(), customer data) work correctly

Suggested workaround:
Expose data via useSettings() by adding metafield to extension settings in extension.toml, or use cart attributes as an alternative.

Status: The developer confirmed the data is dynamic, making the static settings approach unsuitable. The issue remains unresolved with no clear solution for accessing dynamic shop metafields on checkout extensions.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

I am unable to access the shop metafield data that I have stored with a specific namespace and key, on the thankyou-page. I am able to get the data using the metafield namespace and key on the graphql admin ui, but when I try to access it on the extension, I get an empty array.

I have tried almost all the visible ways to access the data, some of them include:

const metafields = useAppMetafields({namespace:“checkout_pro”, key:“form_builder”, type:“shop”});
const testMetafields = useMetafields({namespace:“checkout_pro”, key:“form_builder”})
const metafields = useAppMetafields()

I am able to access the settings data from the customiser using useSettings() hook, and also the customer data, but not the metafield values that I am passing.

This is my extension.toml setup:

[[extensions.metafields]]
namespace = “checkout_pro”
key = “form_builder”
owner_type= “SHOP”

Hi,

Hope this will work

  • Two Practical Ways to Get Your Metafield, Expose Data via useSettings()

If your metafield is something static (like config), just add it to your extension settings and access it like this:

Code Example

# extension.toml
[settings]
form_builder_config = "Your default data or JSON"

[[extensions.metafields]]
namespace = "checkout_pro"
key = "form_builder"
owner_type = "SHOP"

Or Use Cart Attributes as a Hack

Thanks for the help but its dynamic data.