A discount code asks the buyer to do work: find the code, keep it, type it into a field at the very end of the purchase. A discount link does that work for them. They tap, and the product is in the cart with the price already reduced.
Both Shopify and WooCommerce can deliver discounts this way. This guide shows how to set it up on each platform, what to watch out for, and where links work better than codes.
What a discount link does
A discount link is an ordinary URL that carries the discount with it. When the buyer opens it, the shop stores the discount in their session or cart. Depending on how the link is built, it can also add a specific product to the cart and send the buyer straight there.
The buyer never sees a code, so they cannot mistype it, forget it or look for a better one. Every reason in our list of why discount codes fail that has to do with entering a code disappears.
Shopify: three ways to build the link
1. The shareable link from the admin
Create a discount code as usual under Discounts. Shopify lets you share any discount code as a link from the discount's detail page. The link opens your store with the code already applied to the buyer's session; it is deducted in the cart and checkout.
2. The discount URL with a redirect
The same link can be built by hand and pointed at a specific page:
https://yourshop.com/discount/SPRING20?redirect=/products/linen-shirt
The buyer lands on the product page with the discount active. Use this in emails, posts and ads that promote one product.
3. The cart link with product and discount
Shopify's cart permalinks put a variant straight into the cart. Combined with the discount URL, the buyer goes from tap to cart in one step:
https://yourshop.com/discount/SPRING20?redirect=/cart/VARIANT_ID:1
Replace VARIANT_ID with the numeric ID of the variant and 1 with the quantity. This is the shortest possible path: one tap, product in the cart, discount deducted.
WooCommerce: add-to-cart link plus automatic coupon
WooCommerce can add a product to the cart through a URL out of the box:
https://yourshop.com/?add-to-cart=123
For a variable product, add the variation: ?add-to-cart=123&variation_id=456.
What WooCommerce does not do on its own is apply a coupon from a link. For that you need an extension that reads the coupon from the URL and adds it to the cart. The Heartly plugin for WooCommerce does this for its flash sales with a coupon_code parameter; dedicated URL-coupon extensions are available as well. Whichever you use, test that the coupon is still applied after the buyer changes the quantity or logs in.
What to watch out for
- Links travel. A link can be forwarded just like a code. Give link discounts an end date and, if needed, a usage limit, exactly as you would a code.
- Restrictions still apply. Minimum order values, product exclusions and combination rules work the same way as with a typed code. A link does not bypass them; it only removes the typing.
- Show the price before the cart. Make sure the reduced price is visible on the page the link opens, not only in the checkout. Buyers trust what they see before they commit.
- Use the right page. Link to the cart for single-product offers, to a product or collection page when the buyer should still choose.
- Test on a phone. Open the link from the email app or social app you will actually use. In-app browsers sometimes behave differently from the phone's main browser.
When a code still makes sense
Codes are useful where there is no link: printed flyers, packaging inserts, podcasts and spoken recommendations. Influencer and partner codes also double as attribution. For everything that is clicked, such as emails, social posts, ads and deal pages, a link is the shorter path.
How Heartly uses discount links
Every Heartly flash sale gets its own page with countdown and stock limit. Its "Go to checkout" button opens your shop with the product in the cart and the discount applied: on Shopify through a cart that Heartly creates with the product and discount already attached, on WooCommerce through the Heartly plugin. Live sales also appear in the Heartly app, on deals.heartly.io and for AI shopping assistants, each linking the same way.
Why that matters for conversion is explained in Why buyers abandon the checkout.
Frequently Asked Questions
How do I create a discount link on Shopify?
Create a discount code under Discounts and share it as a link from its detail page, or build it yourself as yourshop.com/discount/CODE. Add ?redirect= with a product path or a cart permalink to send buyers to a specific page.
Can a Shopify discount link add the product to the cart?
Yes. Use the discount URL with a redirect to a cart permalink, for example /discount/CODE?redirect=/cart/VARIANT_ID:1. The variant is added to the cart and the discount is applied.
Does WooCommerce support discount links?
WooCommerce can add products to the cart through an add-to-cart URL, but it does not apply coupons from a URL on its own. You need an extension or a plugin such as Heartly's that reads the coupon from the link.
Can a discount link be shared further?
Yes, like any code. Set an end date and, if necessary, a usage limit on the underlying discount.
Do minimum order values still apply with a discount link?
Yes. A link applies the same discount as a typed code, with all its conditions. It only removes the need to type it.