A workaround was shared for finding a Shopify subscription product’s selling plan ID, needed for short add-to-cart or checkout links: open the live product page source and search for selling_plan_id or selling_plan.id, then use the following number.
Several users confirmed the method helped, but others reported limitations, especially when a page’s HTML shows the wrong plan ID for stores with many subscription products or variants. Questions remain about why Shopify does not expose this more directly or provide a simpler permalink generator.
A later update suggests a more reliable approach: append .js to the product URL, such as /products/product-handle.js. The returned product data lists each variant’s selling_plan_allocations, including plan IDs and prices, allowing users to match the correct plan by price or frequency.
A caution was added that selling plan IDs can change if a subscription plan is deleted and recreated; old IDs may silently add a one-time purchase instead. The discussion remains open, with workarounds available but no native Shopify admin solution identified.
Recently I needed to find the selling plan ID for a new subscription product in our store. We needed it so that we could generate a short add-to-cart link which required the ID number.
However, I couldn’t find any Shopify resources about how to find this number. Shopify Support suggested I use an API, but that seemed too complex for what I needed.
After tinkering around a bit, I was able to find the ID in a fairly easy/straightforward way. This will probably be pretty obvious to advanced Shopify users, but I wanted to share with other basic users like myself just in case it may be helpful.
Go to the live product page on your website
Press Ctrl + U on your keyboard or right click and select “View page source”
In the tab that opens, press Ctrl + F to open the page search function of your browser
Search for “selling_plan_id” ( or you may need to search for “selling_plan.id” ) on the page and use the number that directly follows
Hello - I am having issues finding mine. When I go to the product page and search for it, it keeps giving me a product selling plan id for a different product. We have dozens of subscription products with variants. I can find all of my existing products because my dev has them all in our code neatly organized.
But now looking to create a new product and this method does not work for my site.
Is there any other way to find the selling plan id?
Here is the link for a 3 month plan. When you search through the HTML you will find the incorrect selling plan id for a 6 month plan. (I have double checked it is in fact the 6 month plan ID)
I have not yet been able to find a selling plan id and it seems there must be some logical way to do something this simple. Plus, could there not be a permalink generator rather than putting together code and first trying to find the codes that would be used?
Go to the live product page on your website
I assume you would have to have already made a web site displaying the product. I assume you are not talking about an shopify online store page. In order to make the page I need to first get the selling code id. Is there a simple way of making permalinks for buying a product? Is there a way of knowing the selling plan ID?
A quicker route than view-source, and it survives theme changes: add .js to the product URL (yourstore.com/products/your-handle.js). Each variant lists selling_plan_allocations with the plan id and the price, so you can match the plan by price and frequency instead of hunting through HTML.
One caution for anyone hard-coding these ids into links: they change if the plan is ever deleted and recreated, and a stale id silently adds a one-time item. Re-check after any subscription-app migration.