This article will walk you through on how to build a one click checkout link to purchase a product as a subscription

https://{myshopifydomain}/cart/clear?return_to=/cart/add?items[][id]={variantId}%26items[][quantity]={Quantity}%26items[][selling_plan]={sellingPlanID}%26return_to=/checkout

Variables that you would need to fill in

Variable Description
{myshopifydomain} Your myshopify domain in the format
example {domain}.myshopify.com
{variantId} Shopify Variant ID of the product that you want to generate this link for.
{Quantity} Quantity of the variant Id
{sellingPlanID} The frequency/cadence that you require.

Open the Network section of your browser’s developer tools before clicking the add to cart button and then click on the add to cart button to record the payload being sent to Shopify.

How to open the Network section on your browser

It should provide you with {sellingPlanID} and {variantId} of the product.

Untitled

A completed one click URL will look like this. Make sure to remove the “{” and “}” when modifying the respective fields

[<https://demo.loopwork.co/cart/clear?return_to=/cart/add?items[][id]=43029709684955%26items[][quantity]=1%26items[][selling_plan]=3079897307%26return_to=/checkout>](<https://demo.loopwork.co/cart/clear?return_to=/cart/add?items[][id]=43029709684955%26items[][quantity]=1%26items[][selling_plan]=3079897307%26return_to=/checkout>)