Basic Principle: Make Sure a Selling Plan is Added to the Cart
Firmhouse creates Selling Plans in Shopify for the products that you want to sell on subscription. Selling Plans are native to Shopify. To be able to checkout a subscription, a Selling Plan for a product needs to be added to the cart. Your subscription widget should ultimately include either a hidden input field or a radio button that setsname="selling_plan_id" as part of your “add to cart” form. This ensures the appropriate selling plan gets added to the cart when customers add products.
Resources for Building Custom Widgets
The following guides explain how to fetch available selling plans on a Product Detail Page using Liquid, and how to use selling plan attributes to build a user interface:- Adding subscriptions to your theme (Shopify Developer Documentation)
- Adding selling plan options to your Shopify product pages (Firmhouse Developer Documentation)