Scan to order: a QR code to a Shopify cart permalink
A scan-to-order QR code points at a Shopify cart permalink, a URL in the form /cart/{variant_id}:{quantity} that opens checkout with those items already in the cart. Make the permalink, put it behind a QR code, and the shopper goes from scan to checkout in one tap.
The cart permalink format
| Part | Example | What it does |
|---|---|---|
| One item | https://your-store.myshopify.com/cart/36485954240671:1 | Adds quantity 1 of that variant and opens checkout |
| Several items | /cart/36485954240671:3,31384149360662:1 | Comma-separated variant_id:quantity pairs |
| Discount | ?discount=CODE | Applies a discount code. A code that contains a comma cannot be passed |
| Open the cart instead | ?storefront=true | Lands on the online store cart rather than checkout |
| Referral tag | ?ref=flyer-spring | Shows as a referral code in the order's conversion summary |
Limits to know
- Selling plans do not work with cart permalinks.
- Cart permalinks cannot bypass a storefront password.
- A static QR code with the permalink baked in cannot be changed after printing. A dynamic code can.
Doing it with Qraffic
In Qraffic a code can point at a cart as well as a product, a collection, a discount or a page. Cart destinations must be on your store's own domain or its myshopify.com address. The scan redirects through a short link that adds UTM tags, so the order can be matched to the code, and you can change the destination after the code is printed.
Questions, answered
Short answers to the questions people ask most.
How do I make a QR code that adds a product to the cart in Shopify?
Build a cart permalink with the variant id and quantity, for example /cart/36485954240671:1 on your store's domain, and use it as the destination of the QR code.
Where do I find a variant id?
Shopify's help page on cart permalinks explains how to find a product's variant id.
Can the QR code apply a discount?
Yes. Add ?discount= and the code to the permalink. Codes that contain a comma cannot be passed this way.
Can I change the destination after printing?
Only if the code is dynamic, meaning it points at a short link you control. A static code has the permalink encoded in it.