DevCommerce logo

Send customers directly to checkout with Shopify cart permalinks

By Philip Dematis · 5/17/2024 · 3 minutes read
Featured image
Shopify cart permalinks allow you to create links directly to checkout with pre-filled items and applied discounts. This is a short guide on how to use them.

Sometimes you want to share links to your products in Shopify.

But imagine how much faster it would be if the user went right to checkout.

This is what cart permalinks are for!

It's simple.

It's a URL that when visited, gets you to a checkout that's pre-filled with any products (and variants) you've chosen.

It also lets you pre-populate a discount code.

There are a few pages you can share a link to: Product, collection, home, other landing page.

Sending traffic to these pages means the visitor will have to click 2-5 more times.

It also means the visitor might get distracted by something else they see on the pages they visit.

How can you prevent this?

A cart permalink will require no extra action to navigate, add a product to cart, or find and click the checkout button.

This means a much better conversion rate overall.

Of course, that's not always the case - more on that below.

(Read more about checkout optimization here.)

Go to your variant page on the Shopify admin. On the URL, you'll find the variant ID. It's the last part of the URL.

Variant ID in the URL

(Read below if your product doesn't have variants.)

Then, use the variant ID to create the permalink:

This will pre-fill one unit of the chosen variant.

For two units:

So the format is:

[domain]/cart/[variant ID]:[quantity]


Always test the permalink in Incognito mode.

This ensures it won't be affected by your cookies from visiting your own site, in any way.

How to also add a discount code

If you have some sort of promotion, you don't want to say to your customers:

"Get 20% off using discount code NEWPROMOTION".

That's an unnecessary extra step.

Instead, append to the URL:


So the URL becomes:

So the final format with a discount code is:

[domain]/cart/[variant ID]:[quantity]?discount=[discount code]

What if the product doesn't have variants?

Inside info: Shopify products without variants, always have a hidden default variant.

Here's how to find it:

On the admin product page URL, add “.json“. Find “variants”, then get the id of the first variant.
Variant ID with JSON


If you want to send the visitor to checkout with Shop pay, append ?payment=shop_pay to the URL.

If you want to send them to the cart page, instead of checkout, append ?storefront=true.


When appending multiple parameters, you need to give them the right prefix.

In permalinks we have discount, payment, storefront.

When using just one, we prefix it with ?.

When using more than one, we prefix the first one with ? and the rest with &.

So it would become:




(The discount option works similarly to this method, that lets you create exclusive automatic discounts in Shopify.)

Social media

Running a promotion for a specific product with or without a discount code?

Use a cart permalink to achieve a much better conversion rate.

Email marketing

Add permalinks to your emails for a faster checkout.

Consider creating a campaign with an exclusive discount code. And add a permalink in the email for a direct checkout.

Site content

When writing content, e.g. blog posts, consider adding cart permalinks instead of links to product pages.

Direct customer contact

Help your customers buy a specific product they want, without having to browse the entire website.

One final piece of advice

One of the most important aspects of CRO is making sure you're not losing customers due to insufficient information.

When you send a visitor to checkout immediately, you're preventing them from reading more about the product.


Make sure that before visiting the permalink, people have sufficient knowledge about the products in the cart.

Otherwise, they will close the checkout page.


The Shopify checkout doesn't have links to the products in the cart.

Share icon
Facebook logoX logoLinkedIn logo

More articles

Contact us
Shopify partners logoShopify Plus logo