Market/Catalog Prices showing unexpected values

Hi folks,

I’m running into an issue regarding the Shopify admin API and pricelist queries.

As of the recent markets update, Shopify markets can have one or many catalogs, and each catalog has a price list.

Within a pricelist, product variant prices can have an “origin type” of either “relative” or “fixed”

The Shopify API can be used to fetch this information with a query similar to the following:

        {
            priceList (id: "gid://shopify/PriceList/29936582814") {
                prices (first: 1, query: "variant_id:35724590514334") {
                    edges {
                        node {
                            originType
                            price {
                                amount
                                currencyCode
                            }
                            compareAtPrice {
                                amount
                                currencyCode
                            }
                        }
                    }
                }
            }
        }

The “amount” that is returned by the Shopify API can be a little tricky, because it doesn’t always match the value shown in the Shopify admin.

Here is an example:

The 30 / Indigo variant displays a price of 22.53 and is greyed out which indicates a “relative” price.

If I fetch the price using the price list query above however I will retrieve this information.

+"priceList": {#7176
        +"prices": {#7197
          +"edges": [
            {#7079
              +"node": {#7196
                +"originType": "RELATIVE",
                +"price": {#7190
                  +"amount": "30.62",
                  +"currencyCode": "CAD",
                },
                +"compareAtPrice": {#7193
                  +"amount": "34.02",
                  +"currencyCode": "CAD",
                },
              },
            },
          ],
        },
      },

So the admin UI shows the prices in USD, while the API shows the prices in CAD which is the default currency of my store. If I perform a currency conversion I can see that these prices are equivalent, they are just displayed in a different unit of currency (And the Shopify conversion fee is also a factor as I understand)

If I change the price from relative to fixed and fetch the price again, now the result is different:

+"priceList": {#7215
        +"prices": {#7236
          +"edges": [
            {#7158
              +"node": {#7235
                +"originType": "FIXED",
                +"price": {#7229
                  +"amount": "22.0",
                  +"currencyCode": "USD",
                },
                +"compareAtPrice": {#7232
                  +"amount": "33.0",
                  +"currencyCode": "USD",
                },
              },
            },
          ],
        },
      },
    },

When the price is fixed the catalog currency is now used instead of the store default currency.

The above behaviour is what I have come to expect, however I am now finding that this behaviour is not always consistent.

I have a situation involving the following data:

Store ID: 77478658352
Market ID: 78914027824
Catalog ID: 97268171056
Price list ID: 37807161729
Product Variant ID: 54405774410113

For this situation, when I fetch the price with the query below:

        {
            priceList (id: "gid://shopify/PriceList/37807161729") {
                prices (first: 1, query: "variant_id:54405774410113") {
                    edges {
                        node {
                            originType
                            price {
                                amount
                                currencyCode
                            }
                            compareAtPrice {
                                amount
                                currencyCode
                            }
                        }
                    }
                }
            }
        }

I now get back this result:

+"priceList": {#6657
        +"prices": {#7520
          +"edges": [
            {#6653
              +"node": {#6665
                +"originType": "RELATIVE",
                +"price": {#6638
                  +"amount": "280.44",
                  +"currencyCode": "EUR",
                },
                +"compareAtPrice": null,
              },
            },
          ],
        },
      },
    },

In this case, the store default currency is EUR and the catalog currency is USD. This is a relative price so the result I get back looks to match the behaviour I have come to know.

The problem I am finding is that while the API is saying that the currency is EUR, the amount returned (280.44) is the actual USD value - in this case there appears to have been no currency conversion done which is not what I have come to expect.

What i would have expected is since the price shown to US customers is about 280.44, the EUR amount returned for the relative price should have been about 238.80

Can anyone please help me better understand how Shopify’s price list system works in detail? Is this a bug or are there additional technical details which I am missing?

Thanks

Hi @Chris_Geelhoed,

I’ve been able to replicate this behaviour on my test store as well, and after further investigation I can confirm that this is actually expected behaviour with the Admin API returning non-rounded and non-exchanged prices for RELATIVE priceListPrice objects specifically.

This is also mentioned in the following Shopify.dev documentation.

Relative price list prices are returned in the store currency from the APIs and don’t have rounding rules and foreign exchange rates applied. Rounding rules and foreign exchange rates are applied in the online store and checkout.

So while the Admin API is returning the Relative Adjusted Price in the Store Currency, the actual Storefront and Checkout would display the correct adjusted price in the actual market currency after applying the exchange rate.

You can also confirm this as well by querying the product variants using the Storefront API with @inContext Directives specifying what Market the query is using.

Here’s an example from my own test store for reference.

Admin API Query returns the Relative PriceListPrice in the Store Currency:

Storefront API Query with @Incontext Directives returns the Relative price after conversion:

Thanks Kellan.

I think maybe there was some misunderstanding. I also expect relative prices to return in the shop base currency, without the foreign exchange rate applied. That is what I found in the first example I shared using my dev store.

It is the second example that I found to be unexpected. In that case I received this response:

+"priceList": {#6657
        +"prices": {#7520
          +"edges": [
            {#6653
              +"node": {#6665
                +"originType": "RELATIVE",
                +"price": {#6638
                  +"amount": "280.44",
                  +"currencyCode": "EUR",
                },
                +"compareAtPrice": null,
              },
            },
          ],
        },
      },
    },

This was for a catalog for the US market. The “EUR” is expected, but the 280.44 price was not expected, because that was the actual customer facing price in USD.

I expected the relative price to be the EUR equivalent, so about 240.49

Unfortunately the merchant has since changed that catalog price to be a fixed price, so we can no longer reproduce the issue.

Hey @Chris_Geelhoed,

I apologize for the misunderstanding, and unfortunately I’m also unable to replicate the incorrect pricing being returned on my own test store. The Relative Price List Prices are all returning the expected store currency, with the correct price of the product adjusted based on the price list rules.

Since we are unable to correctly authenticate access to affected stores, we are unable to investigate or share details on specific stores through the Community Forums. So if the issue happens again, I would recommend reaching out to the Shopify Support Team via the Shopify Help Center, with the following information and we can absolutely help look into it further detail.

Example of an API call returning the unexpected behaviour within the last 30 days:

  • The full plain text HTTP Request, including URL, Body, and Headers (no access tokens)
  • The full plain text HTTP Response, including Body and Headers