After cart creation, call cartBuyerIdentityUpdate with the cart ID and a CartBuyerIdentityInput containing countryCode and optionally customerAccessToken or email.
Setting countryCode triggers market resolution: Shopify selects the matching Market, applies localized pricing, and updates cart.cost to reflect market-specific prices.
If the buyer is authenticated, include customerAccessToken so the cart is associated with the customer account, enabling B2B company resolution if applicable.
Read cart.buyerIdentity.countryCode and cart.market back in the response to confirm the resolved market.
Re-fetch cart.cost.totalAmount after updating buyer identity because prices and currency may change based on the resolved market.
Consult current Shopify Markets docs for which markets are available and how to enable markets with country-specific domains or subfolders.
Known gotchas
Changing countryCode after lines have been added may cause line items to become unavailable if the variant is not published to that market.
B2B buyer identity resolution requires a customer access token linked to a company contact; not all customer accounts are B2B contacts.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp