Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Dynamic initial price for a subscription

Solved

Dynamic initial price for a subscription

BartekL
Shopify Partner
5 1 1

Hi,

we're building an app for a client who offers highly customizable products as a subscription.

The problem we currently have is that there is no way (that we know of) to create a checkout with an item on a selling plan with custom price.

 

I know we can alter the subscription contract price afterwards, but we're not able to set a custom price on the initial checkout.

 

We tried multiple options like:

- Creating a Checkout object via API, but it doesn't even let us create it for a product which can be sold only as a subscription

- Creating a Draft Order with a custom product and then creating a Subscription Contract based on it, but an Order doesn't contain Payment Method ID, so we can't make a seamless conversion from a single order into a subscription.

 

Is there any way to create a checkout for a subscription with a custom price?

Accepted Solution (1)

Greg_P
Shopify Partner
41 4 34

This is an accepted solution.

Hello @BartekL,

 

I think you can use functions for your case, fresh solution from Shopify: https://shopify.dev/docs/api/functions/reference/cart-transform/developer-preview#example-update-ope...

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

View solution in original post

Replies 2 (2)

Greg_P
Shopify Partner
41 4 34

This is an accepted solution.

Hello @BartekL,

 

I think you can use functions for your case, fresh solution from Shopify: https://shopify.dev/docs/api/functions/reference/cart-transform/developer-preview#example-update-ope...

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

This looks very promising, I'll direct my research that way.

 

One thing, it says it's currently in developer preview. Do you have any idea when it might be available publicly?