Getting Link Expire error on cart page

When I try to navigate to the following cart link from my external app:

I receive a “Link expired” error.

However, when I open the same URL in an incognito browser window, it loads correctly.

Could you please help me understand why this is happening and how to resolve it?

Thank you!

Hey @naffah_khalil - I can’t say for certain exactly why this is happening without a bit more information, but since the link is working in incognito, it is likely a browser-state issue with your day to day browser. If you clear your cache/cookies on your “main” day to day browser Chrome instance, you should see the link work. These issues can also often pop up if you’re using certain browser extensions, etc. If the issue persists after clearing your cookies though and if you’re not running any extensions, just let me know and we can take a look.

If you can test the link on another browser (Firefox, for example) and it works - the likely reason is temporary internet data from your usual day to day browser.

Hope this helps a little bit :slight_smile:

Hello @naffah_khalil

Have you been able to rectify the issue you are facing or should share an experience with a user as well, could definitely help you

Hi @Robert_Clark
I am unable to rectify the issue.

Great question — and yes, this is a common Shopify behavior related to session-based cart tokens and cookies. Here’s what’s likely going on:

Why it works in incognito
When you open the cart or checkout link in an incognito window. there are no existing Shopify session cookies — so Shopify creates a clean, valid session and token for that checkout link.

:cross_mark: Why it fails in a regular browser
In your regular browser:

  • You likely already have an active session tied to a different cart or checkout.
  • When you open a checkout link with a different token (from your app) that doesn’t match the current session— Shopify throws a “Link expired” error to prevent cart/session conflicts.

How to fix or handle this
Here are a few ways you can approach this:

Option 1: Open in a new incognito/private window

This works for testing but isn’t practical for users.

Option 2: Use cart.js or the Storefront API
Instead of generating a checkout URL externally:

  • Add items to the cart via Storefront API or cart.js
  • Then redirect the user to /checkout— keeping everything within their active Shopify session.

This avoids the token conflict issue entirely.

Option 3: Clear or reset the session
Not always recommended — but if your app controls the store session or you can trigger a logout/reset before redirecting to the new checkout, it’ll avoid conflicts.

Summary
The issue is a session conflict — Shopify restricts conflicting checkout tokens in the same session for security and consistency.
:check_mark: Best practice: Use Shopify’s built-in cart flow (via Storefront API or cart.js) to keep checkout in the same session.