#mp_api

1 messages ยท Page 1 of 1 (latest)

stone radishBOT
#

๐Ÿ‘‹ 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/1325843073745420481

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

low vortexBOT
elder quail
#

Hi there ๐Ÿ‘‹ I'm taking a closer look at the request you shared.

river temple
#

Thankyou Toby

elder quail
#

The problem that the error is trying to explain, is that the value you've provided for subscription_proration_date is outside of the range of the Subscription's current billing period.

The value you provide for subscription_proration_date should be within the Subscription's current billing period, otherwise it doesn't make sense to include that parameter.

Currently you're setting the proration date to a timestamp before the Subscription's current billing period, mean the Subscription would have been prorated in a previous billing period, which isn't supported.

Similarly the proration date can't be after the current billing period, because then the next upcoming invoice would be the Invoice that is generated when the Subscription naturally cycles to the next billing period.

#

You will want to adjust the value you're providing for the proration date in this request to be within the current billing period.

river temple
#

So we by default are passing todays' date when trying to preview an invoice

elder quail
#

It looks like you passed the current date when you made that request, but not the current time.

You passed a timestamp about 4 minutes in the past when making the request, and the Subscription's billing period at that point had started about 2 minutes in the past.

river temple
#

What do you suggest? Should I send subscription start date?

elder quail
#

I don't know. I'm not sure what timestamp you're trying to use for proration calculations in this scenario, that's something you would tell us.

Are you intending to try to calculate prorations on the upcoming invoice?

river temple
#

Yes, when we are making any changes to the subscription we want a preview of the upcoming invoice