#jsdesign-sw_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/1427944412209745950
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
req_LTp4hE4Knv6Y0b
This is 6 hours apart, and the longer it takes for you to upgrade, the more expensive the amount paid becomes
๐ Hi there! Let me take a look
You have shared two different subscriptions here, created and updated at different times, so it's hard to make a direct comparison
Is that intentional?
I am testing the coupon function, but I found that subscriptions that use discount codes have longer waiting times and higher upgrade costs
The small difference in cents between the two subscriptions is because you updated them at slightly different times
I know it's because the time intervals are different that the prices are different, but shouldn't the longer the time interval, the cheaper the price
I understand, because the amount of your current upgraded subscription remains the same, but the amount of money that needs to be refunded for the current subscription keeps decreasing, resulting in the longer the upgrade time, the more money needs to be paid
But why does the amount of this line [1] not change over time
I believe it can depend on the proration_date provided when updating the Subscription: https://docs.stripe.com/api/subscriptions/update#update_subscription-proration_date
If the Subscription has been updated to apply the prorations as of a certain timestamp, then previewing the invoice after that time (or with a proration_date after that time) will show a fixed amount
The preparation_date I sent is the time at the moment of the request
You can take a look at the parameters of my requests and the differences in the corresponding lines
But why does the amount of this line [1] not change over time
The amounts changing (or not changing) can depend on how much time has passed. If the invoice amount is small, and there's only a small difference in theproration_dates, then there may be no monetary difference
The examples you've shared are invoices with a lot of changes happening, also after the request IDs that you shared
Do you have a simple example that you can create, which shows the problem you're having?
For example, I am currently on a single year subscription of $100/year and I want to upgrade to a $150/year subscription. If I upgrade on the first day of the current year, it will cost $50, but on the last day of the year, it will cost $100. In theory, the longer the current subscription is used, the less money is required for the upgrade
Right. The prorated amount due for the time remaining in the billing cycle will reduce over time from $50 to $0
That amount depends on the difference between the billing period start and the proration_date
So the question I mentioned earlier is why the amount continues to increase over time