Creating a smooth shopping experience is key to driving conversions on any online store. One simple yet powerful tool many store owners overlook is the Shopify Add to Cart (ATC) link. It lets users skip the product page and add items directly to their cart, or even go straight to checkout if needed.
Whether you’re promoting a product through email, social media, or a landing page, an ATC link makes the buying process faster and easier. No distractions. No drop-offs. Just a quick path to purchase.
In this guide, we’ll show you how to create, customize, and automate Shopify ATC links. If you’d rather leave the technical stuff to professionals, consulting Shopify development experts can help you easily set it up.
What is a Shopify ATC Link?
In Shopify, every product has variants such as size, color, or material. So, when someone adds a product to their cart, they’re actually adding a specific variant.
A Shopify ATC (Add to Cart) link lets you skip the usual process of going to the product page and choosing options. Instead, you just share a URL that instantly adds the product (with the selected variant) to the customer’s cart when they click it. It’s fast, direct, and super useful for promotions, emails, or even customer support chats.
Basic Format
Here’s what the basic link looks like:
https://examplestore.com/cart/VARIANT_ID:QUANTITY
VARIANT_ID is the unique ID of a product variant (like a medium-sized blue t-shirt).
QUANTITY is how many units you want to add.
Example
https://examplestore.com/cart/41059824312345:1
Clicking this adds 1 product unit with that variant ID directly to the cart.
Multiple Products in One Link
You can also add several products to the cart using a single link. Just separate each variant and quantity with a comma:
This instantly takes the user to the payment step, and their selected items are ready to go.
How to Create a Cart Permalink from Shopify Admin
Shopify makes it easy to generate a cart permalink directly from your Shopify store’s dashboard. This link adds a specific product variant to the cart, which is ready for checkout. By default, each permalink includes one variant, but you can build more complex links manually if needed.
Note: Before starting, make sure you have the Buy Button sales channel installed in your Shopify admin.
Steps to Create a Cart Permalink:
In your Shopify admin, navigate to Products.
Select the product for which you want to create a cart permalink.
Click the More Actions dropdown menu.
Choose the Create Checkout Link from the menu.
Select the desired product variant.
Click the Copylink to get your cart permalink ready to share.
This simple process lets you quickly generate direct add-to-cart links without any coding. For more complex carts with multiple variants, consider manually building the links or using automation tools.
Generating ATC Links for Other Websites
The Shopify Buy Button app offers an easy way to create embeddable “Add to Cart” or “Buy Now” buttons that you can place on any external website, such as WordPress or Wix.
How it works:
Install and open the Buy Button app in your Shopify admin.
Choose a product or collection to create a Buy Button for.
Select the product. Customize the button’s style and settings as desired.
Copy the generated embed code (HTML/JavaScript).
Paste this code into the HTML of your external website page.
Check the output on the front end after saving the changes.
This method allows customers to add products directly to their cart or purchase without leaving the external site, seamlessly connecting back to your Shopify checkout. It’s perfect for expanding sales channels beyond your Shopify store.
Want to Create High-Converting Cart and Checkout Links? We Can Help!
Now that you understand what a Shopify ATC (Add to Cart) link is and how to find product variant IDs, it’s time to bring it all together. Building an ATC link manually is simple once you know the structure.
ATC links are especially useful for quick promos, landing pages, and support interactions. Here’s a step-by-step guide to creating ATC links on your own:
Step 1: Choose the Product Variant
Start by identifying the exact product variant you want to link to. For example, it might be something like “Red Hoodie – Size L.” Each variant in Shopify has a unique ID that you’ll need to build the link. To find the variant ID, you can use Shopify’s .json endpoint:
Once you open that URL, search for the variants array in the JSON output. It will look something like this:
{
"id": 42555111222333,
"title": "Red / Large"
}
That ID is the variant ID you need for the link.
Tip: Use your browser’s “Find” (Ctrl+F or Cmd+F) to search for the word variants or id to locate it quickly.
Step 2: Insert the Variant ID into the Link Structure
Once you have the variant ID, plug it into the standard ATC link format:
https://yourstore.com/cart/VARIANT_ID:QUANTITY
Just replace the placeholder values with the actual variant ID and desired quantity. For example:
https://yourstore.com/cart/7929880182858:1
This link adds 1 unit of the Red / Large hoodie to the user’s cart as soon as they click it. You can use this format in emails, ads, chat support, or even embedded buttons.
Step 3: Add Multiple Products (Optional)
Want to link to a bundle of products? You can include multiple items in a single ATC link by separating them with commas:
It’s perfect for curated combos, suggested pairings, or limited-time offers involving more than one product.
Step 4: Redirect Directly to Checkout (Optional)
To remove one more step from the purchase journey, you can take the user straight to the checkout screen instead of the cart page. Just add? Check out the end of your link:
This instantly opens the checkout page with the chosen product(s) pre-loaded, reducing friction and boosting your chances of conversion.
How a Shopify ATC Link is Built?
Understanding how a Shopify ATC (Add to Cart) link is structured is the first step to using it effectively. These links follow a consistent pattern, which makes them easy to create, reuse, and even automate for different marketing and sales campaigns.
Let’s break down the structure and its key components:
Basic Format
The base format looks like this:
https://yourstore.com/cart/VARIANT_ID:QUANTITY
VARIANT_ID: The unique identifier for a specific product variant (for example, a medium-sized blue hoodie).
QUANTITY: The number of units you want to add to the cart.
Example:
https://shoestore.com/cart/42342342342342:1
When someone clicks this link, 1 unit of the selected variant is automatically added to their cart.
Multiple Products
You can include multiple product variants in a single link by separating each with a comma:
Want to reduce the number of steps in the buying process? You can redirect users directly to the checkout page by adding? Check out the end of your ATC link:
By skipping the cart page, you’re removing friction and nudging users closer to completing their purchase.
How to Find Shopify Variant IDs?
To create a Shopify ATC (Add to Cart) link, you first need the variant ID. This is a unique number tied to a specific version of a product like “Blue, Size L.” Shopify assigns these IDs automatically when you add product variants.
Even if you don’t have backend access, there are multiple quick ways to find these IDs. Let’s walk through the most reliable ones:
Method 1: View Page Source
Open the product page on your browser.
Right-click anywhere and select “View Page Source.”
Use Ctrl+F (or Cmd+F on Mac) and search for:
“variantId” or “variants”
You’ll see raw product data embedded in the page’s HTML. From there, you can find variant IDs. This works well when you just need one or two IDs quickly.
Method 2: Use the .js Endpoint
Shopify stores expose product data through a simple .js file:
https://yourstore.com/products/product-handle.js
Example:
https://hatsworld.com/products/blue-cap.js
Open this in your browser. It’ll return the product’s structured data (in JavaScript object format), including all its variant IDs.
Method 3: Use the .json Endpoint (Recommended)
This is the cleanest and most developer-friendly option. Use this pattern:
This is the most developer-friendly and automation-ready option.
Method 4: Use Shopify Admin API (Advanced)
If you have backend access (as a developer or merchant), you can fetch variant IDs using the Shopify Admin API.
Requires API credentials (private or custom app)
Useful for bulk product management
Ideal for automation or data-syncing tasks
Finding the right variant ID is the foundation of any ATC link. Once you’ve grabbed it, creating fast, frictionless cart experiences becomes a straightforward task.
Automating Shopify Add to Cart Links
If you’re managing hundreds of products or planning big marketing campaigns, manually creating ATC links won’t scale well. That’s where automation saves time and reduces human error. Here are two simple ways to automate link generation:
Use a Python Script
A basic Python function can generate ATC links using variant data. Here’s a simple example:
Example script:
def build_atc_link(store_url, variants):
base = f"{store_url}/cart/"
items = ",".join([f"{vid}:{qty}" for vid, qty in variants])
return base + items
Automating ATC link generation is a huge time-saver, especially for large catalogs, promo drops, or campaigns. With just a bit of setup, you can handle hundreds of links without lifting a finger.
Tips for Using ATC Links
ATC (Add to Cart) links are more than just shortcuts; they’re flexible, powerful tools that can improve user experience, boost conversion rates, and support smarter marketing campaigns. Let’s break down some of the most effective ways to get more out of your ATC links.
Use ATC Links to Pre-Apply Discounts
You can combine an ATC link with a discount code to give customers an instant deal when they land on the checkout page:
Applies the SUMMER SALE discount automatically at checkout
Tip: Replace spaces in your discount code with %20 (URL encoded space).
Link Directly to Subscriptions or Bundles
If your store uses third-party apps to manage subscriptions or product bundles, those options often come with unique variant IDs. That means you can build ATC links for:
This encourages repeat purchases or larger average order values without extra clicks. Just make sure the variant ID matches the bundled or subscription SKU.
Customize with URL Parameters (Hidden Features)
Many Shopify themes or apps recognize URL parameters beyond basic cart and discount functions. You can use these extras to enhance tracking or user interaction.
This helps tie your ATC link to specific marketing efforts or experiences.
Don’t Skip Testing
It’s easy to assume your ATC links will just work, but themes, apps, and browser quirks can cause issues.
Make sure to:
Test on mobile and desktop
Try multiple browsers (Chrome, Safari, etc.)
Verify that discounts and products load as expected
Also, double-check variant IDs regularly. If a product gets deleted, duplicated, or reconfigured, old variant IDs might break, leading users to a 404 or empty cart.
Combine with Shopify Scripts for Advanced Logic
If your store is on Shopify Plus, you can take things even further with Shopify Scripts. These allow advanced checkout customizations that can trigger when a user arrives via a specific ATC link.
What you can do:
Offer tiered discounts based on cart value
Add a free gift when a specific product is in the cart
Apply custom shipping rules or messaging
Result: Dynamic cart behavior that adapts to how the customer enters the funnel—super powerful for targeted marketing and high-volume sales.
ATC Link Security: Best Practices for Merchants
While Shopify ATC links are great tools, merchants need to be mindful of potential risks and ensure their store stays secure and functional. Proper precautions help maintain control and protect your revenue.
Prevent Unauthorized Discount Abuse
When using ATC links with discount codes, be cautious about sharing publicly. If a discount code is embedded like this:
It can be shared beyond your intended audience, leading to unwanted discount abuse.
To reduce risk:
Use unique, limited-time discount codes.
Monitor discount usage closely via Shopify reports.
Combine discounts with customer account restrictions.
Regularly Audit Variant IDs
Product variants can be deleted or changed, which breaks ATC links.
Make it a habit to:
Review variant IDs in your links after product updates.
Set up automated alerts or scripts to verify link validity.
Update marketing materials immediately if variants change.
Use URL Parameters Wisely
Avoid adding too many custom URL parameters that may conflict with Shopify apps or your theme. Excessive parameters can cause unexpected behavior or errors in checkout.
Test new ATC links thoroughly to ensure they function across devices and browsers.
Limit Bot Traffic
Since ATC links can be used in bots or automation tools, high bot traffic might strain your store’s resources or cause inventory issues.
Mitigate this by:
Implementing bot detection and throttling apps.
Monitoring unusual spikes in cart additions or checkouts.
Taking these precautions ensures that your Shopify ATC links work smoothly without compromising your store’s security or sales integrity. With proper management, you can enjoy the benefits of ATC links while minimizing potential downsides.
FAQs About Shopify ATC Links
How to generate a payment link in Shopify?
To generate a payment link in Shopify, create a draft order in Orders > Create Order, add products, then click Email invoice or Copy payment link. This link sends users to checkout.
How do I create a tracking link in Shopify?
When fulfilling an order, enter the tracking number and carrier. Shopify generates a tracking link that is sent via email and shown on the order status page.
How to make a Shopify add to cart link?
To create a Shopify ATC link, use: https://yourstore.com/cart/VARIANT_ID:QUANTITY Replace VARIANT_ID and QUANTITY with real values. Clicking the link adds the product to the cart.
How do I create a custom add to cart button on Shopify?
Add a button with a custom link: <a href=”/cart/1234567890:1″>Add to Cart</a> Replace the ID with the product variant ID.
How to add a sticky add to cart in Shopify?
Use a Sticky Add to Cart app or add a custom fixed-position button in your theme code. Make sure it stays visible while scrolling.
Let’s Summarize
Shopify ATC links are a quick and powerful way to improve the shopping experience. Whether you’re adding single products, bundles, or applying discounts, these links save time and reduce clicks for your customers. Once you understand how to find variant IDs and build the links, the process becomes fast and repeatable.
With a bit of testing and automation, you can use ATC links to boost conversions and streamline campaigns.
If you want help setting up advanced cart links, integrating subscriptions, or customizing your checkout experience, we can help. With our expertise, you can boost conversions and make your store more efficient, flexible, and user-friendly. Contact us today and get started with your project!
Ankur Shah is a tech-savvy expert specializing in eCommerce solutions. With a deep understanding of WooCommerce and Shopify, he helps businesses optimize their online stores for success. Whether it's implementing new features or troubleshooting issues, Ankur is your go-to guy for all things eCommerce.