#alexisadeveloper

1 messages · Page 1 of 1 (latest)

ebon mossBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

young crow
#

but maybe you're right , since there is no schedule_data or schedule_phases params or so on on that endpoint, just a schedule. So probably it depends what exactly you're doing and if you're actually using a Schedule and what you are looking to preview.

steady rover
#

Essentially we have two ways users can update their subscription. One is as an instant upgrade, where i just call subscription.update and the other happens during the next billing period. If somebody upgrades instantly and then updates his subscription again with a schedule, then we need to be able to preview what the next invoice is going to be (would be hard to calculate this ourselves since the instant upgrade includes prorations). Basically I need to be able to show users what they will pay on their next invoice, if they were to add a schedule to their subscription. Correct me if I'm wrong, but I think the subscription_items applies more to instant upgrades rather than scheduled ones? Or is there any way to make them behave the same? For example by providing a date where the subscription changes and then making sure there are no prorations?

rotund frigate
#

Hi! I'm taking over from my colleague. Please, give me a moment to catch up.

#

I don't think upcoming invoice can preview an upgrade in the future. However, given the upgrade happens on the billing cycle end, you won't have any prorations, so it should be possible to calcualte on your own.

steady rover
#

Actually, there is a case where I will have prorations. Users can both instant upgrade and upgrade their subscription with a schedule. If they instant upgrade, there will be prorations. If they then add a scheduled upgrade, the next invoice includes the prorations from the instant upgrade as well as the cost for the the upcoming scheduled change. I guess I could use the upcoming invoice for the current subscription and do the math, but since retrieveUpcoming API call has a "schedule" field, I assumed the right way to do this would be to add a schedule of some sorts.

rotund frigate
#

I haven't seen this being used. I'd suggest doing an instant upgrade first and then calculating the future update yourself.