So, I have a scenario where a Super User can create a subscription for another user. But now I want it to be so that even if the super user creates the subscription, he does not have to pay himself. Instead he can just click a button to Email the invoice or a payment link to the user and once they pay up, their subscription id and status is updated in bubble via some sort of a webhook.
Yeah for simplicity I would suggest:
Superuser Adds user, new user gets email invite, when new user starts creating account the stripe payment signup process is managed. Right?
Actually, in my app a user can have multiple subscriptions. And the account for the user would already be made. I just want the super user to send the subscription invoice to the user somehow by email or as a notification in my app etc so they can pay up.
@Oliver-wholegraintech any leads?
Can you just send them an email with a link to a page of yours which has the stripe checkout to get them to input the card details for this subscription?
If they have one or multiple subscriptions that’s fine, but the user who’s paying needs to interact with the checkout interface etc.
I would view it as creating the “subscription” object on your end when the superuser makes it, and then marking it as active when the user checks out and starts paying for it.
@Oliver-wholegraintech Hmm that’s clever but I’m kind of using the default stripe checkout to be honest and using the “Subscribe Current User” workflow on current user. How do I associate it with the user and how do I create the checkout on a new page though?
Ohhhh, yeah using the plugin will keep you very restricted.
I would recommend using stripe directly with the bubble API interface, that way you have complete control so you can easily achieve this.
There are some good tutorials around, but if you get stuck let me know, I’m a freelancer so I can jump on some screen share calls and teach you how it works.
I’m using both the plugins and the api calls lol. I’m a developer myself but I was looking for a quicker way but thanks I guess this is the only way left lol.
Yeah, will take like an hour extra to get started but will be better off in the long run IMO
@Oliver-wholegraintech though can you point me in the right direction? Like talking step wise:
- Create a Price
- Associate it with a Subscription (Do I pass the customer id of the Bubble user that is by default given to us when we have the stripe plugin installed?)
- Create a Checkout Session
- Email the checkout session link to the user?
Is this the way to go about it?
Since you mentioned there are multiple subscription types I would create these as a custom data type and then have a list of these on the user’s profile, if they are able to have multiple subs active at once.
So I’d let the superuser create a subscription on the bubble side of things for the user, send them and email with a link to checkout, in the link I would pass a url parameter which is the uid of that subscription.
Only once they click on that link would I bring stripe into it, I would just do the normal checkout process, I’m assuming the subscription prices are already set etc so you can choose which elements to pre fill based on the url param.
Then once checkout is successful you mark the subscription as active on the bubble side giving them whatever access etc.
Also remember to set up a webhook to mark the subscription as cancelled etc.