#yoshie902a - plan and product

1 messages · Page 1 of 1 (latest)

mystic brook
#

I believe that that has to be two separate calls.

#

Will the need to two these two calls a lot or are you just confirming that you can't do both at once?

keen crow
#

I would like to do both at the same time to reduce calls

mystic brook
#

Also does your integration already work with plans or are you starting to build this part of the integration?

keen crow
#

I thought you could create the product when you create the plan.

#

My products and plans won't change, so just need to load them initially.

mystic brook
#

How often are you creating new products and plans?

keen crow
#

should be very rare

#

I guess I can do two calls.

#

I just thought there was a way to do one

mystic brook
keen crow
#

Oh, wait, prices?

#

Maybe you can recommend the best way to implement what I need to do. I have a membership based website. The website has differen memberships, level 1, level 2, level 3. Each membership the use can choose if they want to pay monthly or yearly. Its all recurring.

#

I thought I needed a Product for each membership and a several plans for each product., one plan would be yearly, and the other monthly.

#

Where does prices come in now?

mystic brook
#

That is all correct, you will just want to work with Price objects specifically. You can still define them as recurring and being monthly/yearly/etc

keen crow
#

Why use price vs plan?

mystic brook
#

Price is newer, plan is legacy. The prices API is backwards compatible with plans

#

I can look in to the differences but basically Prices can do everything Plans could and more

keen crow
#

Currently, I am using plans for everything and my intergration uses plan.

#

If I create a plan, and slowly move my integration to prices, do I need to create new price objects?

#

What is the recommended way to migrate to prices?

mystic brook
#

You should be fine to keep using Plans if you would like. As I mentioned, Prices are backwards compatible with Plans so you should be fine to pass your plan IDs anywhere that takes a price ID

keen crow
#

In the future, once I upgrade to prices, can I migrate my plans to prices?

mystic brook
#

You should just be able to use your plan IDs anywhere that a price ID is required.

#

I apologize, I was mistaken on the differences between the two flows. As per the migration guide,, is more what you pass the IDs in to and how that changes

keen crow
#

but you have price objects and plan object.

#

Can I migrate my plans to prices?

#

I understand it currently works without migrating them, but I would like to be able to migrate them.

#

after I move to prices, I do not want legacy objects left

#

bascially, can I delete my plan objects and create new prices objects with the same id?

#

IF not, can I use my the "Plan" api calls with and expect it to work with my Price objects?

#

Can you assign a custom ID to price? You can do it for plan per the API, but does not look lik you can for price

mystic brook
#

Not with the same ID unfortunately.

#

And I am unsure if you can set a special price ID. We typically recommend against custom IDs now even when they are available.

#

I still need to look a bit in to on if creating the new price objects is necessary. Will get back in a moment on that

mystic brook
#

Apologies that that took me a while. So you do not need to make any new objects at all, you can just start using all of the Price API calls but use the plan IDs. You can even update your plans with the modify price call for example https://stripe.com/docs/api/prices/update