Cart links guide
Shopify add-to-cart link format
What you’ll need
Your store’s address (like your-store.myshopify.com or your own domain)
Parts of the link
- /cart/111:1,222:2 — variant IDs with quantities (variant, not product, IDs).
- ?storefront=true — open the cart page instead of checkout.
- ?discount=CODE — apply a discount code.
- ?note=… and ?attributes[key]=value — shown in the order’s Notes.
- ?ref=… — shown as a referral code in the order’s conversion summary.
- ?payment=shop_pay — open Shop Pay.
- A locale before /cart (/fr/cart/…) opens a translated checkout.
Where to find variant IDs
In admin, open the product and click the variant: the ID is the last number in the address bar. Or skip that: the builder lists every variant by name and fills the ID in for you.
Limits
- Subscriptions (selling plans) aren’t supported by cart links; use a subscription checkout link instead.
- Links can’t get past a storefront password.
- Sold-out or deleted variants show an error at checkout, so re-check old links.