#Surya-Mani
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
i need to display the current plan details ,price of the plan and renewal date how should i display it by subscription id or customer id
You can retrieve the Subscription on the backend: https://stripe.com/docs/api/subscriptions/retrieve
And then show the details to your customer
by retrieve uing subscription id am i right?
Yes
ok i will check it but in response there is only price id and no renewal date is there and not showing the current plan
in that json there is no object that will i ask to you
What are you receiving now?
What are you looking for?
im looking for show current subscription plan of the user , price of that plan , and renewal date of that plan
The price is in items.data.price.unit_amount (x quantity). The renewal date is current_period_end.
for current plan showing
What do you mean?
im using graduation pricing table .In that table three types of plans are available. I need to display what plan user uses?
You can't highlight the plan the customer is currently on in pricing table, unfortunately.
im integrate customer portal with my own UI design so user going to upgrade or downgrade i need to display the existing plan to user .then it's easy to upgrade or downgrade
You can just hide the current plan from the table and only show the other 2 options.
there is no possible for showing current plan?
how will i hide the current plan?
Hello
How are you currently setting up the Pricing Table?
by using the script
here hackerrank's page i need to use exactly like this showing details
Sorry, I don't understand. Do you want to get the details of the current Subscription and display it in your own UI, or do you want to show the upgrade options?
👋 stepping in here as vanya needs to step away
ok
So when you retrieve the Subscription you want to expand the items.data.price.product
The product is what you are referring to as the "plan"
yes did you see the image
Sure, did you read what I wrote about using expand?
yes
Okay so are you doing that when you retrieve the Subscription?
yes
Okay so then what information are you missing from the Subscription/Plan that you need for your frontend?
You have everything you can get there
yes but how i display the current plan
You pass the information to your frontend and you build a UI that shows it.
You are the developer here, we can't do this for you.
you give the objects or renewal date showing and price o the plan like that tell me how should i display the current plan of the user . there is any object for showing current plan?
We are talking in circles. You have the current Plan when you retrieve the Subscription.
- Your customer loads your page.
- You retrieve the Subscription server-side.
- You pass the data you want to show like the current Plan back to your client
- You display that data in a UI that you built client-side
I'm not sure where the confusion lies at this point.
i'm asking what is that particular object/attribute for display current plan?
what is the attribute using for Get Price of the subscription plan?
There is no specific method for just retrieving that information if that is what you are asking. You retrieve the Subscription as you are doing and the property which contains the current Plan on the Subscription object is items.data[0].price
here they showing current plan type and price and renewal date i also need to show like that
All of that is within the Subscription object.
My colleague described that at the beginning of this chat
ok tell me the exact one