#Miguel Cruz
1 messages · Page 1 of 1 (latest)
Hello! The languages and frameworks you're using do not impact how prorations are calculated. We have documentation about how prorations are calculated here: https://stripe.com/docs/billing/subscriptions/prorations
Hi there! I've reviewed the documentation you provided, but I'm wondering if there's a way to calculate prorations in real-time directly from the frontend without making additional API requests. I already have the product IDs and prices stored locally. I would appreciate any advice or methods I can use to achieve this. Thanks
Btw the difference between the results is aprox $10mxn
That's not something I would recommend you do, and we don't have any guidance for doing so.
You can use the upcoming Invoice API to preview changes to Subscriptions: https://stripe.com/docs/api/invoices/upcoming
Mm okey thanks! 👍
Regarding the use of the upcoming Invoice API to preview changes to subscriptions, I would like to know if there are any potential concerns or performance impacts if I make frequent requests to this API. In my scenario, the client may select different plans and I need to show them the total amount before generating a payment order. This would require making API requests every time the client selects a different plan in the interface.
There are no special concerns using that specific API. The general concerns around rate limits apply, just as they do for any other API request, but our rate limits are quite generous and it's unlikely you'll run into them unless you're running a very large operation.