#yoshie902a - plan and product
1 messages · Page 1 of 1 (latest)
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?
I would like to do both at the same time to reduce calls
Also does your integration already work with plans or are you starting to build this part of the integration?
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.
How often are you creating new products and plans?
should be very rare
I guess I can do two calls.
I just thought there was a way to do one
You can do it if you have a legacy integration and are working with service type products https://stripe.com/docs/api/plans/create#create_plan-product
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But if you are making things now, we recommend working with our Prices API https://stripe.com/docs/api/prices
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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?
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
Why use price vs plan?
Learn what products and prices are and how to use them in Stripe.
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
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?
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
In the future, once I upgrade to prices, can I migrate my plans to prices?
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
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
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
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