Skip to main content

How to make Buy Buttons for your membership

This article will give you instructions to make a custom URL that you can use to make buy buttons for your membership plan

Updated this week

By default, the membership can only be purchased on the Membership Product's own product page. This is because our widget is needed for the product to be added to the cart successfully.
​
However, it is possible to make your own custom buttons to place elsewhere on the store to act as a Buy Button for the membership.
​
Creating a buy button will require finding 2 ID numbers. One is the Shopify Variant ID for the product, and the other is the Selling Plan ID for the membership plan length.

  1. You can find the Shopify Variant ID by navigating to your membership product page, adding the membership to your cart, and then navigate to the Cart JSON file on your store at http://storename.com/cart.json (change storename.com to your store's domain). The Variant ID will be among the data shown in this file.

  2. You can find the Selling Plan ID inside our app. Go to the Plans menu, and below each Plan, you will see an ID number for each Plan Length. This is the Selling Plan ID number.


Make a Buy button that redirects customers to the Cart page

Using the 2 ID numbers you found above, create a URL using the following format:
​

https://storename.com/cart/add?id=VVVVVVVVVVV&quantity=1&selling_plan=SSSSSSSSSSSS

Replace storename.com with your store's domain, replace the V's with the Variant ID number, and replace the S's with the Selling Plan ID number.


Make a Buy button that redirects customers to the Checkout page

Using the 2 ID numbers you found above, create a URL using the following format:

https://storename.com/cart/add?id=VVVVVVVVVVV&selling_plan=SSSSSSSSSSSS&quantity=1&return_to=/checkout

Replace storename.com with your store's domain, replace the V's with the Variant ID number, and replace the S's with the Selling Plan ID number.


Want to inject a discount code into the cart too?

If you want to inject a discount code into the cart along with the membership, just add the following code to the end of the URL:

?discount=DISCOUNTNAME

Please don't hesitate to reach out to our support team if you run into any issues with this process. We're happy to help!

Did this answer your question?