How to create a Shopify link that fills the cart with a discount

Send shoppers from an email, ad, post or QR code straight to a ready cart — the right products, the discount applied, one tap from paying.

Updated October 2026 · 8 min read

Short answer

Shopify has basic cart links, but you build them by hand from technical product IDs, and they can't add subscriptions. Cartsella Studio's campaign links let you pick products, quantities, subscriptions and a discount code, then give you one short link on your own domain that opens the cart, checkout or a product page.

Why send shoppers straight to the cart?

Every step between your message and checkout loses people: landing on a product page, picking a size, finding the other items, remembering a code. A link that arrives with the cart already filled and the discount already applied removes all of them.

A shopper taps a link in a social story, sees a branded loading screen and lands on checkout with three products and a discount applied

Option 1: Build a Shopify cart permalink by hand

Shopify has a built-in link format, called a cart permalink, that fills the cart and opens checkout. It needs no app. You build it from your store's domain, the word cart, and each product variant's ID and quantity.

Step 1: Find each variant's ID

In your Shopify admin, open the product and click the variant (size, color…) you want. The number at the end of the page's address, after /variants/, is the variant ID. A product without options has one variant: open it from the product's variant list the same way.

Step 2: Put the link together

Write /cart/ after your domain, then variantID:quantity for each product, separated by commas:

https://yourstore.com/cart/70881412:1,70881382:2

This link puts one of the first product and two of the second in a fresh cart and opens checkout.

Step 3: Add a discount code

Create the discount in Shopify (Discounts › Create discount) and add its code with ?discount=. Several codes go in one parameter, separated by commas, if your discounts can combine:

https://yourstore.com/cart/70881412:1,70881382:2?discount=SUMMER15

Step 4 (optional): more parameters

Add to the linkWhat it does
storefront=trueOpens the cart page instead of checkout.
payment=shop_payOpens Shop Pay checkout.
note=newsletter-mayAdds a note to the order, so you can see where it came from.
attributes[from]=instagramAdds a cart attribute, shown in the order's notes.
ref=creator-annaRecords a referral code on the order.
checkout[email]=…Pre-fills the shopper's email at checkout.

Join several with &: /cart/70881412:1?discount=SUMMER15&storefront=true. For a store in several languages, put the language first: /fr/cart/…. The full list is in Shopify's cart permalink documentation.

What cart permalinks can't do

Option 2: Campaign links with Cartsella Studio

  1. Pick the products and quantities — including the subscription option for products that have one.
  2. Add a discount code you've created in Shopify. The link applies it for the shopper.
  3. Choose where it opens: the cart, straight to checkout, or a product page.
  4. Set dates if you like. The link turns itself on and off; outside its dates it quietly opens your home page.
  5. Share it — copy the short link on your own domain or download its QR code.
Creating a campaign link in Cartsella Studio with three products, a discount code, checkout as the destination, a QR code and click count

Create your first campaign link in under a minute.

Join the waitlist: 50% off your first year

Where to use cart links

Measuring results

Each campaign link shows its clicks over the last 30 days, and every order it creates shows which link it came from — so you can see which creator, email or ad actually drives sales.

Frequently asked questions

Can a Shopify link add several products to the cart at once?

Yes. A campaign link can add several products and quantities in one tap.

Can a cart link apply a discount code automatically?

Yes. Create the discount in Shopify, add its code to the campaign link, and it's applied for the shopper.

How do I find a variant ID in Shopify?

Open the product in your Shopify admin and click the variant. The number at the end of the page's address, after /variants/, is its ID.

How do I make a cart link open the cart instead of checkout?

Add storefront=true to a Shopify cart permalink, for example /cart/70881412:1?storefront=true. In a campaign link, choose Cart as where it opens.

Can a cart link add a subscription product?

Shopify's cart permalinks can't: selling plans don't work with them, so the product goes in as a one-time purchase. Cartsella Studio's campaign links can add products with their subscription option selected.

Do campaign links change anything in my store?

No. Links live in Cartsella Studio; nothing is added to your products, discounts or theme.

Read next: Cart links for subscriptions · Everything campaign links can do · Pricing