#Surya-Mani

1 messages · Page 1 of 1 (latest)

restive fractalBOT
barren trench
#

Hi! Let me help you with this.

shut flint
#

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

barren trench
shut flint
#

by retrieve uing subscription id am i right?

barren trench
#

Yes

shut flint
#

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

barren trench
shut flint
#

in that json there is no object that will i ask to you

barren trench
#

What are you receiving now?

shut flint
barren trench
#

What are you looking for?

shut flint
#

im looking for show current subscription plan of the user , price of that plan , and renewal date of that plan

barren trench
#

The price is in items.data.price.unit_amount (x quantity). The renewal date is current_period_end.

shut flint
#

for current plan showing

barren trench
#

What do you mean?

shut flint
#

im using graduation pricing table .In that table three types of plans are available. I need to display what plan user uses?

barren trench
#

You can't highlight the plan the customer is currently on in pricing table, unfortunately.

shut flint
#

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

barren trench
#

You can just hide the current plan from the table and only show the other 2 options.

shut flint
#

there is no possible for showing current plan?

shut flint
restive fractalBOT
shut flint
#

Hello

barren trench
shut flint
#

by using the script

#

here hackerrank's page i need to use exactly like this showing details

barren trench
#

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?

shut flint
#

yes

#

exactly like the image

final pelican
#

👋 stepping in here as vanya needs to step away

shut flint
#

ok

final pelican
#

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"

shut flint
#

yes did you see the image

final pelican
#

Sure, did you read what I wrote about using expand?

shut flint
#

yes

final pelican
#

Okay so are you doing that when you retrieve the Subscription?

shut flint
#

yes

final pelican
#

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

shut flint
#

yes but how i display the current plan

final pelican
#

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.

shut flint
#

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?

final pelican
#

We are talking in circles. You have the current Plan when you retrieve the Subscription.

  1. Your customer loads your page.
  2. You retrieve the Subscription server-side.
  3. You pass the data you want to show like the current Plan back to your client
  4. You display that data in a UI that you built client-side
#

I'm not sure where the confusion lies at this point.

shut flint
#

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?

final pelican
#

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

shut flint
final pelican
#

All of that is within the Subscription object.

#

My colleague described that at the beginning of this chat

shut flint
#

ok tell me the exact one