Stripe subscription, how to charge for subscription changes immediately

Hi all, first time post as its the first time I’ve got properly stuck since learning the bubble platform.
I am building a business management system that has user access payments through Stripe. Initial subscription is fine for the main user but I want the account holder to be able to buy additional licenses for staff members to have access.
I have managed to make the changes by increasing the licensed volume but it doesn’t charge for the changes until the next billing cycle. Not so bad if the user is on a monthly plan but a yearly one they could use 11 months and cancel which would in theory never be charged.
I was thinking about maybe creating a one-off invoice for the immediate changes and then add a credit to the subscription which will be taken on the next billing cycle.
It’s not perfect but it could work, I just hope there is a better more elegant way around amending the subscription.

Any help or advice with this would be appreciated.

You might want to change the billing anchor to be reset to the current date. Check out this Stripe help: https://stripe.com/docs/billing/subscriptions/billing-cycle

2 Likes

Thanks very much, that worked a treat.

@ben.mason what did you do to get around this?

Sounds like they read the info at the link 2 posts above and did that. (Probably reset the billing anchor as described under bullet 2 in this part of the page: https://stripe.com/docs/billing/subscriptions/billing-cycle#changing.)

If so, API-wise they’d have done a call like the second one shown on the page here: https://stripe.com/docs/billing/subscriptions/billing-cycle#api.

Ok, but how did they do it?

Whether they were using Stripe by Bubble, that other Stripe plug-in, or had created their own API calls, a fairly easy thing to do would be just to quickly configure their own Stripe API call even just specifically for this one thing.

Stripe API authentication is pretty simple (in Bubble terms its “private key in header”) and then this call is pretty simple too. So, this is not a WORKING example, but it would be something like:

Now, that’s a DIY approach. I don’t know anything about the stripe.js plugin and whether it has support for the “billing_cycle_anchor” parameter. But if it does, @ben.mason would have just gone, “Oh, OK, set the anchor to ‘now’… and don’t forget to prorate.”

(I suspect, based on ben’s response that he might just have configured Stripe his own self, but who knows? Perhaps he’ll chime in.)

Got it! Thanks a lot!

1 Like

And just to be clear, making the reset call above would be done immediately after (for example) the Stripe by Bubble update subscription step (I assume).

@ben.mason did you get an API post working to achieve this?