Shopify Quick Wins: How to Find Variant IDs & Selling Plan IDs (for Buy Buttons, Subscriptions, and Faster Checkout)
If you’ve ever tried to build a Buy Button or direct add-to-cart link in Shopify, you’ve probably hit the same wall I did: where the heck do I find the right IDs?
When I was setting up new Blind Barrels products and subscription flows, I needed two things:
- Variant ID – even single-variant products have one.
- Selling Plan ID – required for subscriptions (like Bold Subscriptions or Recharge).
Shopify doesn’t exactly put these IDs front-and-center. After digging through docs, community threads, and app support, here’s the consolidated guide I wish I had from the start.
Why You Need These IDs
- Buy Buttons: Add-to-cart links that pre-load items (fewer clicks = fewer abandoned carts).
- Subscriptions: You can’t build subscription cart links without the selling_plan_id.
- Faster Checkout: Skip menus and product pages — drop customers directly into checkout with the right product.
For Blind Barrels, that means subscribers can go from “I want whiskey” to “Order confirmed” in one click.
How to Find the Variant ID
Every Shopify product has at least one variant_id, even if you don’t set variants.
Quick methods:
- Product JSON:
Append.js
to any product URL:https://yourstore.com/products/product-handle.js
Search for
"id":
— that’s the variant ID. - Cart trick:
Add the product to your cart → click into it from the cart → the PDP URL shows?variant=XXXXXXXXXXXX
. - Admin JSON (bulk):
Visit:https://admin.shopify.com/store/yourstore/variants.json
(Note: shows 100 at a time.)
How to Find the Selling Plan ID
If you sell subscriptions, you’ll also need the selling_plan_id.
Quick methods:
- View Source:
- Open the product page.
- Right-click → View Page Source.
- Search for
selling_plan_id
.
- Product JSON (.js):
Append.js
to the product URL, searchselling_plan_id
. - App admin:
In Bold Subscriptions or Recharge, IDs are listed under subscription groups/plans.
Add-to-Cart Link Formats
Once you have the IDs, here’s how to use them:
- One-time product:
/cart/{VARIANT_ID}:1
- Subscription product:
/cart/{VARIANT_ID}:1?selling_plan={SELLING_PLAN_ID}
- Buy Button channel attribution (optional):
/cart/{VARIANT_ID}:1?selling_plan={SELLING_PLAN_ID}&channel=buy_button
You can even stack multiple items:
/cart/{VARIANT1}:1,{VARIANT2}:2
Real Examples (Blind Barrels)
- 1-Box (Buy Button):
https://blind-barrels.myshopify.com/cart/44499272073423:1?channel=buy_button
- Annual Subscription:
https://blindbarrels.com/cart/44499268403407:1?selling_plan=7286849743
- Quarterly Subscription:
https://blindbarrels.com/cart/44491378622671:1?selling_plan=7286784207
Business Tip: “Free Shipping” Without Saying It
In alcohol sales, you can’t legally advertise “free shipping.” Instead, roll the shipping cost into the price and use these Buy Button links to streamline checkout. Customers still feel like it’s a one-click, all-inclusive purchase — and you stay compliant.
Sources & Further Reading
- Shopify Community: Find Selling Plan IDs
- Recharge Support: Variant & Selling Plan IDs
- Shopify Community: Single Variant Products
Wrap-Up
With the right IDs, you can:
- Create direct checkout buttons for products and subscriptions.
- Reduce clicks, boost conversions, and prevent abandoned carts.
- Stay compliant (especially in regulated industries like alcohol).
This small technical fix translates to real sales impact. For Blind Barrels, it means our whiskey boxes and subscriptions are only a click away.