#jayy-proration-calc
1 messages · Page 1 of 1 (latest)
Hello
I don't believe the API supports that today unfortunately. You can only preview prorations for an invoice (not custom amounts)
alright.. and is it possible to know how prorations are actually calculated? to the second, minute hour in stripe?
atleast i can then do the calculations approximately to display xD
Hmm, let me see if we have any docs on this
alright 🙂
So we calculate by the second.
https://stripe.com/docs/billing/subscriptions/prorations
The prorated amount is calculated as soon as the API updates the subscription. The current billing period’s start and end times are used to calculate the cost of the subscription before and after the change.
So, first we calculate the time fraction from the proration periods and the initial subscription periods:
(see first screenshot)
Then, the calculated time fraction is multiplied by the total amount for each price
(see second screenshot)
oh awesome! Thank you!
NP! 🙂 Happy to help