Shopify checkout shows a map view—can I access those coordinates for third-party use?

Hi everyone,

I see a “View map” option on Shopify orders, which suggests coordinates are stored on the order. I’m building third-party flows outside Shopify (e.g. a custom COD landing page with distance-based shipping) and need to understand how Shopify handles this before mirroring the approach.

Two main questions:

  1. Are order coordinates produced by geocoding the address the customer enters (and writing them back), or can Shopify obtain them via device GPS (or similar) at checkout time?
  2. Is there a public API to read these coordinates, and can I use them in systems outside Shopify?

One more thing that puzzles me:

If coordinates come only from address geocoding, I’d expect poor results when customers enter messy or incomplete addresses—missing street numbers, vague village names, and so on. In practice, I’ve seen cases where the address fields look bad or incomplete, yet the map pin still lands on the actual house with surprising accuracy—more precise than I’d expect from ZIP- or village-level geocoding alone.

That makes me wonder whether another path exists—e.g. GPS, map pin selection, or an app/extension writing coordinates directly during checkout—rather than inferring location solely from the visible address fields after the fact.

Could someone clarify which mechanism typically explains “poor address text but accurate house-level pin”? Or does Shopify’s geocoder use inputs not visible in the order JSON (e.g. note_attributes, Autocomplete-related data, etc.)?

My current understanding (please correct if wrong):

  • The standard Checkout sandbox does not appear to expose browser GPS
  • Community threads suggest address geocoding may be asynchronous (coordinates sometimes appear only after the initial callback)
  • Carrier Service destination lat/lng is often null at checkout

Redacted example (API/app-created order, Romania):

{

“checkout_id”: null,

“shipping_address”: {

“address1”: "Puzdra ",

“city”: "Broșteni, sat Holda. ",

“zip”: “727075”,

“country”: “Romania”,

“latitude”: 47.24033679999999,

“longitude”: 25.6976665

},

“note_attributes”: [

{“name”: “house_number”, “value”: “Nr 115”}

]

}

Links to official docs, staff clarifications, or similar cases would be greatly appreciated. Thanks!

Hey @hongtao ,

This is a really interesting question. I’ve also noticed cases where the visible address looks incomplete yet the map pin is much more precise than I’d expect.

I haven’t come across any official documentation explaining whether those coordinates come purely from address geocoding or if other data sources can contribute to them.

I’d be interested to see if someone from Shopify or a developer who’s investigated this can clarify how the coordinates are generated and whether they’re exposed through a supported API.

Thank You !

Hello @hongtao

Your understanding is mostly correct. The shipping_address.latitude and shipping_address.longitude fields on an order are not generally collected from the customer’s device GPS during Shopify Checkout.

A few points that may help:

  • Shopify geocodes the shipping address after or during checkout using its mapping/geocoding services. If geocoding succeeds, the resulting coordinates are stored on the order and can be returned by the Admin API.
  • The standard Shopify Checkout does not expose the browser’s Geolocation API to apps or Checkout UI Extensions, so you can’t obtain the customer’s GPS location unless you’re collecting it yourself outside of checkout (for example, on a custom storefront or landing page where the customer explicitly grants permission).
  • If you retrieve an order through the Admin REST or GraphQL API, you’ll often see shipping_address.latitude and shipping_address.longitude when Shopify has successfully geocoded the address. They’re read-only values generated by Shopify rather than something you can write yourself.

Regarding your example where an incomplete-looking address still resolves to a very accurate location, there are several possible explanations:

  • The visible address fields may still contain enough information when combined (city, postal code, street, and other metadata) for the geocoder to identify a unique address.
  • Postal codes in some regions correspond to a very small geographic area or even a single property.
  • Shopify’s address normalization and geocoding may use additional internal processing before persisting the coordinates, even though those intermediate values aren’t exposed in the order payload.
  • If the order originated from a custom app or headless storefront, it’s also possible that another system validated or enriched the address before the order was created.

I’ve not seen any public API that exposes the internal geocoding process itself, nor one that lets third-party systems request the same service independently. If you need coordinates for an external COD flow before an order exists, you’ll generally need to geocode the address yourself (or capture the customer’s location with their consent) rather than relying on Shopify to provide them.

So, for a custom distance-based shipping workflow outside Shopify, the typical architecture is:

  1. Collect the shipping address (or an optional map pin/GPS location with user consent).
  2. Geocode it using your preferred mapping provider.
  3. Calculate the delivery distance.
  4. Store those coordinates in your own system and, if needed, save them as order metafields or attributes for future reference.

That approach gives you deterministic results and doesn’t depend on Shopify’s internal geocoding timing or implementation.