Connecting API’s to create Subscription App

Shopify Partner
7 0 3

I’m having some trouble understanding how to get past the initial Selling plan API while creating a custom Subscription app for my company’s store. I have built a Next.js embedded app where an employee can create a selling plan group, selling plan and attach either products and/or variants. I also sort of understand how to handle post purchase logic of the Contract API using webhooks and GraphQL calls, but I’m totally lost on how to develop the customer experience of seeing selling plans on a product or variant, whether it’s manually updating liquid code in a theme file or, and here’s the most mysterious part to me, using the Storefront API to show plans on products, add them to a cart and get a checkout URL. Where would that code go? In my app? In a special theme file, or somewhere completely different. The docs don’t seem to ever say where this logic goes. All of the docs are pretty ambiguous and could really benefit from sample repos some more in depth instructions about project structure and where certain APIs are responsible. Thanks in advance. 

Reply 1 (1)

Shopify Partner
157 19 39

The docs have been getting around subscriptions.  Take a look at these to get going:


I think the example you're looking for is fully written out here:


Hopefully these help you a bit : ) 

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic