Get Product Price

Topic summary

How to retrieve product variant prices in the Storefront API converted to a storefront’s enabled currencies.

  • Solution: Use the GraphQL @inContext directive with a country parameter (e.g., country: AU) to return variant prices in the currency enabled for that country.
  • Implementation: Query products → variants → price { amount, currencyCode } while wrapped in query @inContext(country: XX).
  • Reference: An official guide on international pricing and requirements is linked for setup details.
  • Artifacts: A code snippet illustrating the exact query structure is provided and central to the answer.
  • Status: Question appears resolved with a clear method and documentation; no outstanding disputes or follow-ups noted.
Summarized with AI on January 29. AI used: gpt-5.

Is there a storefront API query, preferably within the ‘products’ query, that returns variant pricing converted to the storefront enabled currencies?

Hi @engkiwi :waving_hand:

Passing a country parameter to the@inContext directive returns the variant prices with the currency enabled for that country. We have a guide here that explains the requirements as well.

query @inContext(country: AU) {
    products(first: 3) {
        nodes {
            variants(first: 10) {
                nodes {
                    price {
                        amount
                        currencyCode
                    }
                }
            }
        }
    }
}

Hope that helps!

@Umiko