Can I create subscriptions where the products aren't known until renewal time?

Solved
CalebKWP
Tourist
6 0 7

I want to create an app that lets' you subscribe to "curated" packs (e.g. Winter Bundle).

The subscriptions would have no products set. But every quarter, the store admin would manually pick-out/curate products. Then renew all the subscriptions with these products. 

 

Can you create active SellingPlanGroup(s) and SubscriptionContract(s) with no products?

 

When renewal time came, I would need to:

- use sellingPlanGroupAddProductVariants and subscriptionContractUpdate to update the subscriptions to contain the desired products

- Then make a subscriptionBillingAttemptCreate call to generate an order

- Then remove the products from the SellingPlanGroup(s) and SubscriptionContract(s).

Would that work?

 

Thanks

Accepted Solution (1)
Brian_S
Shopify Partner
127 18 36

This is an accepted solution.

I'm pretty confident that it is not possible to create a subscription contract with no products. 

 

https://shopify.dev/api/admin-graphql/2022-10/objects/SubscriptionContract#connection-subscriptionco...

 

^ lines is a non-null, non-empty array type on the SubscriptionContract

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic

View solution in original post

Replies 2 (2)
Brian_S
Shopify Partner
127 18 36

This is an accepted solution.

I'm pretty confident that it is not possible to create a subscription contract with no products. 

 

https://shopify.dev/api/admin-graphql/2022-10/objects/SubscriptionContract#connection-subscriptionco...

 

^ lines is a non-null, non-empty array type on the SubscriptionContract

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
Greg_P
Shopify Partner
38 4 23

If you will use the same price for each order you can simply create Generic product, something like "Our awesome bundle" and then before every billing attempt make updates to contract.

Shopify Developer
If I have solved your issue, please mark my post as accepted solution 🙂