My subscriptions are set to 'always_invoice' when someone changes subscription plans.
I can easily change the users subscription using their default payment method, and have Stripe automatically charge the card on file. However, during the 'change subscription plans' flow I would like to be able to present the user with a PaymentElement form in case they want to make this payment a one-off, with a brand new card.
I need a PaymentIntent clientSecret value to do this, but I can't for the life of me figure out how to get one in this specific situation. The PaymentIntent needs the exact proration calculation stripe makes when you call retrieveUpcomming(invoice) or updateSubscription(). retreiveUpcomming doesn't generate a paymentIntent for obvious reasons, and updateSubscription() is actually trying to modify my subscription before the user has confirmed their new payment method. Even if I turn on 'pending_if_incomplete', stripe is still going to charge the default payment method.
Any help would be much appreciated!