#juneid_90104
1 messages · Page 1 of 1 (latest)
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.
- juneid_90104, 6 days ago, 4 messages
Hello! What's up?
Hi there
So basically i am displaying proration amount of subscription plans on my checkout screen.
But the amount charged by stripe is different which is causing inconvenience for my customers because the amout displayed and prorated is different.
I am using this formula in my application
var diffInMinutes = (anchorDate - purchaseDate).TotalMinutes;
var currentMonthTotalMinutes = (anchorDate - anchorDate.Date.AddMonths(-1)).TotalMinutes;
return (diffInMinutes / currentMonthTotalMinutes).ToDecimal() * fullChargeAmount;
You should not try to calculate proration on your end. Instead you can retrieve a preview of the upcoming Invoice and see the proration calculations on it: https://stripe.com/docs/api/invoices/upcoming
but i am showing it while registration process and i will call the subscription after the customer has registered.
is there any specific formula used by stripe to calculate proration amount.
The proration calculations we use are very complex and not something you can replicate on your end. The upcoming Invoice API exists for this exact reason: so you can see our actual proration calculations instead of trying to do them on your end.