#stripe_connect_platform - subs with plans or prices
1 messages · Page 1 of 1 (latest)
Hi, looking into this. Give me a moment to catch up
You should be able to access it on the subscription object. Can you share a subscription ID where the subscription was created with a plan?
sub_1KFKD2CspcVvLNiq3jIEHK8u
This one has an ID of "price_" so I know it's a price
sub_1KFmr6CspcVvLNiqXYa2jXY3
This one has a custom ID so we want to check if a Price or a Plan
sub_1KFKD2CspcVvLNiq3jIEHK8u
Or this one:
sub_1KEyJECspcVvLNiqT93Ngg5H
Those are from the connected account with a customer with subs he is trying to import into the app.
Hey there. Any progess on this?
Hi I have a lot of users
One min
Can you check one thing for me? When you retrieve the subscription https://stripe.com/docs/api/subscriptions/retrieve and check within items.data[0].price.object, is that value different for subscriptions created with plans than subscriptions created with price?
I will check again, but that's what I did. I pulled a Sub created with a Price and a Sub created with a plan and couldn't find any difference. That's why I am contacted you.
I think what you guys are doing is adding that Price in items.data[0].price.object to be backwards compatible which is usually helpful but in this case we have the price/plan ID and it is getting put in both places so I need a skillful way of confirming if it really is a Plan or really is a Price.
Yeah, I cannot distinguish between the Price and Plan on a Sub
Dropped off this for a bit. Still looking in to it. I am wondering
So the end goal is to have just the price table and get rid of the plan table?
Nope
We have Plans in one table and Prices in another. We have customers with 1000+ subscriptions we have to import. We need to know what the person purchased so it is associated correctly in our app. To do that, when we migrate over a subscription, we have to tell if the Subscription was created with a Plan in our Plan table or a Price in our Price table. We are not backwards compatible in the same way as you.
@safe zodiac I don't know of a reliable way to do that unfortunately. The two are compatible together and there shouldn't be a need for you to check that and you should be able to assume all Plans are Prices or vice versa
We have Plans and Prices in separate tables on our end.
Can we make API calls to retrieve the Plan by it's ID and it would fail for Plan and succeed for Price or anything? Or if it is a Price, then vice versa? We need to tell if it is a Plan in our db or a Price in our db.
Since we did not create the subscription and it is simply importing the record of an existing subscription.
We really need to add some logic to tell if it is a Plan or a Price.
Can we make API calls to retrieve the Plan by it's ID and it would fail for Plan and succeed for Price or anything?
No, that's the whole point of our API, the id works in both objects, always
I understand you have separate tables, for historical reasons, but I don't understand why you need to know for new subscriptions that you ingest