Hello, I am trying to upgrade a users subscription by using prorations. I have an api call “Retrive an upcoming invoice” that i’m using to preview the cost to upgrade.
I circled the subscription_proration_date as i’m thinking that this might be the issue of why my preview is showing a different amount than what is being charged (also Stripe is looking for 10 digits here therefore the dynamic expression is current date time +1 extract UNIX / 1000: floor) but not sure if this is what the problem is. I hope this makes sense, please let me know if you have any questions.
The way I solved this is I created a API call to Stripe “Customer Portal” from here the user can navigate to Stripe, click on the plan they want to upgrade onto and Stripe will provide them with proration amount. You will have to go onto your Stripe Dashboard, type "portal "under Search and from here you can go to Subscriptions and enable “prorate subscription updates”. This is a nice option as you don’t have to show the user a preview in Bubble, you can just direct them to the portal to view the proration and subscribe.