#wullvie_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1331713419610423357
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
yup
technically the issue is not that the code /api is giving me wrong information. it
it's showing me the same thing i see in the test dashboard when manually editing the subscription
I want the preview to be able to tell me: A) your new item(s) will be the yearly subscription ($5,100 usd /yr), B) you have $0.00 due now (from the free trial days remaining), and C) on Feb 13, 25 you will be billed the 5100
Yeah you are going to have to deduce some of that from the preview -- it won't return you all of that information explicitly.
it gives me exactly that though when going from monthly to monthly
due now 0, after trial the new $ starts at 2/13 etc
What does going from monthly --> yearly show exactly?
so in the screenshot that's going from monthly to yearly, which visually shows the info I am getting from the api, but it's misleading / confusing i thikn
here's what i see in the dashboard going from monthly to monthly
the mo to yr change showing "amount due: 0" "bills immediately for 1 year" is strange to interpret. seems to be suggesting the client would be billed $0.00 for 1 whole year, where it really will be $0.00 until the trial ends, then it should be the new yearly sub price billed when the trial ends on Feb 13
Ah yeah okay, I understand that is confusing however changing the interval does reset the billing cycle and generates a new Invoice, (see: https://docs.stripe.com/billing/subscriptions/upgrade-downgrade#billing-periods) which generates a new Invoice here.
So technically the next Invoice will be $0
oh specifically interval changes are the cause here ok
So yeah the Preview isn't going to be great for this and you'll need to look at the other properties to display the correct info to your customer.
ok so staying the same interval is going to give me what I'm expecting. that actually makes sense i guess an interval change is unique so I'll break it down differently
this way regardless or $ going up or down, or how it's prorated, same intervals vs. different intervals should both be consistent
Would you happen to know of top of ur head if I can pull this info from the preview? or should i try running a next invoice fetch or something for interval changes
When you say "pull this info" what are you referring to specifically?
sorry lol - when running an invoice preview request that has an interval change (like this example mo -> yr), would the information I need be nested somewhere in the preview response? (even through an expanded property is fine) or would I need to run another request to get a future invoice or something
information i need - meaning data that I can display to my client that shows 0 due now, and then (in this case) 5100 will be the amount billed after the trial is up, Feb 13
from the first screenshot I sent, I would need more info than what the dashboard UI is showing in the summary. I can "infer" that the 5100 will be billed after the trial, but I would feel more comfortable seeing that in the response itself
I see, thanks for clarifying.
Hmmm, what does lines.data show you? Do you still see the line_items even for the trialing Invoice or it just indicates Trial there? I can't remember.
Otherwise, you can expand subscription and that should show you that info
in the preview response, and lines data, going from the mo -> yr change, it shows 1 item: "Trial period for .... yearly subscription", the period start is the original subscription start (jan 16) and the period end is Feb 13
same thing for current_period_start and ...end same vals
one sec
here's the req id for the preview: req_gqI9LHnZ1eWJui
Oh yeah that looks like it will work
So you can look at the subscription.items.data[0].price
Which would indicate the specifics of that Price like amount and interval
so there's no explicit "timestamp" telling me the end of the new yearly invterval period? the period in which the user will actually have paid for
on the extended sub ok i see that. so at trial_end they will be billed the new yearly sub price?
Yep
ok. then from trial_end, is the interval 1 year from that date, or from the original (Jan 16 here)
One year from the trial end
ok cool