App metafield in checkout extension

Topic summary

A developer is trying to access metafields within a Shopify checkout extension but is unclear about the differences between app-owned metafields, metafield definitions, and metaobject definitions.

Current Implementation:

  • Added metafield configuration in the checkout extension with namespace “testimonial” and key “author”
  • Using useMetafield hook in JavaScript to retrieve the metafield data
  • Code includes console.log(appMetafields, "appMetafields") for debugging

Key Issue:
The developer needs clarification on which type of metafield is appropriate for their use case and how to properly configure it.

Status: Question remains unanswered; awaiting guidance on metafield types and correct implementation approach.

Summarized with AI on November 9. AI used: claude-sonnet-4-5-20250929.

I want to access metafields in my checkout extension but I’m not sure which metafield is correct to use. I’m confused about app owned metafield, metafield definition, and metaobject definitions

Please note that I already added the code in checkout extension as below

[[extensions.metafields]]
namespace = "testimonial"
key = "author"

And in my js file I’m using this

const metafieldNamespace = "testimonial";
  const metafieldKey = "author";
  
 
  const appMetafields = useMetafield({
    namespace: metafieldNamespace,
    key: metafieldKey,
  });

 console.log(appMetafields, "appMetafields");