How to get a Stripe 'quote' for changes to subscription BEFORE sending them to Stripe?

Hi there,

FWIW: I’ve been looking at the bubble docs as well as all the Stripe plugins I can find, but I can’t see an answer to this anywhere, it just seems to be a case which is (unusually) absent.


I want to show a price total (from Stripe) for UI elements where the purchaser can update the number of users on their existing subscription. When they click ‘+1’, I want to get an updated price from Stripe and display that (it doesn’t matter if it’s 1-2 seconds, I just need it to be accurate).

I have several different product subscription tiers, which have auto-discounts at various user quantities (the user may also have a discount code applied to their account).
Stripe has this pricing logic set up already, so I would like to get a quote from Stripe based on the tier and quantity provided for the current user, including any discounts.

Modelling the same ‘algorithm’ that stripe uses to calculate price is very difficult (if possible) and creates two maintenance areas and not a ‘single source of truth’.

So, the problem: I can’t seem to query stripe to get a ‘quote’ or create a draft invoice without providing the price in the configuration.

Is there a way to do this? It seems like users with similar requirements have been modelling their Stripe structure in bubble, but that’s not really viable in my context and it’s a blocker, so I would really appreciate some guidance.