#Aarti
1 messages · Page 1 of 1 (latest)
Is there a reason you want to retrieve the plan and not the price? The Plans API is legacy/deprecated, but we include it in the response for backwards compatibility reasons - most new users would want to retrieve the Price instead
Ah I see. Good to know. My goal is to get the product for which this subscription was created.
Then you'll want to iterate through all the subscription items and check items.data[].price.product for each one (https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-price-product)
Gotcha! Thanks for the pointer. While I have you here, what is Stripe's recommendation on storing these subscription and price/product details in a database? To avoid frequent Stripe calls.
I don't believe we have a general recommendation (since it really depends on your setup/integration needs) - mostly we just want you to avoid repeatedly retrieving objects (since that'll eat into your rate limits) but other than that you can do what works for you
Sounds good, thanks for your help!