I'm trying to add subscription products to my custom, API-driven React storefront that uses the Storefront API (so I'm not using a Shopify theme).
I've added Recharge to my Shopify store, but am running into an issue where subscription-only products in Shopify are only available on the Shopify Online Store and don't show up in my custom storefront. I also can't get the subscription product to show up when I create a checkout through the Storefront API.
I believe it depends on when you installed ReCharge.
If you’re on a version of ReCharge that uses the Shopify Checkout, it currently is not possible to add checkout line items with selling plans using the Storefront API. The Shopify Subscriptions API roadmap says that this should become available
H2 this year.
EDIT: I am wrong, it’s now H1 2022. https://shopify.dev/concepts/apps/subscriptions-faq
If you’re on an older version of ReCharge that uses the external ReCharge checkout then you can use the ReCharge Pro Checkout API to create a ReCharge checkout with subscription items. You’ll then need to redirect to the ReCharge checkout in order to complete the transaction. You’ll need to build a backend wrapper for the API as the Checkout API is not a public API and should not be exposed to the internet - you can do things like set line item prices to zero through this API!