Stripe subscription

So…

I found multiple posts, about stripe but non for exactly what I need. The other ones are a few steps ahead.
How exactly do I create a subscription?
I have created it in dasbhoard on stripe, I have its ID which appears to be optional in workflow at subscribe the user to a plan.
Nothing on stripe documentation for bubble, and nothing on bubble’s site at plugins :frowning:

I want to first collect the user’s CC details.
Then I want to prompt for a subscription with 30 days free of charge.
It asks ‘Stripe plan name’ … I can’t select anything. Where do I have to create it? Shouldn’t it take it from stripe db directly via API?

Thank you!

1 Like

You need to get API keys from the Stripe dashboard. Select API from the left-hand menu, and copy the publishable and secret keys. These will go in your Bubble plugin settings for the Stripe plugin.

Keep in mind that you have separate keys for test and live environments. Stripe works similarly to Bubble in that you have a test and live mode. Only test transactions/actions can happen in test mode, only live cards can be charged in live mode, etc.

Once you have the keys in there, the Subscribe the user to a plan action (in a Bubble workflow) will show you the plans you created in Stripe - they’ll populate the plan name dropdown. This action will also handle the CC collection, even if you’re doing a free trial. The CC info will be collected, not charged, and as soon as the trial is finished, the card will be charged.

Also, remember to create plans in the live mode of Stripe as well (when you’re ready) - and they need to have the exact same ID as the test plans because that’s how Bubble will know which plan to use for both environments.

Let me know if that helps you move forward or if you’re still stuck.


Gaby | Coaching Bubble
Private coaching, courses, and tons of free resources

2 Likes

thank you so much. I did that already, this is why it’s confusing… why it’s not working.

Could you share a link to your editor? Make sure your app is set to public for the time being, and I can take a look.

sent you the link in PM thanks!!

1 Like

so with suggestions from romanmg, to whom I am really thankful, I refreshed my browser, refreshed my keys private/public, test/live, remade the workflow… and I still can’t see the subscription plan made in stripe.
Does anyone else has an idea?

1 Like

Try adding the word Bearer with a space after it before your sk_live and sk_test keys.
So, Bearer sk_test....

No guarantees but worth a try.

thanks, no difference though…


Based on this… I understand that it works… it communicates with stripe, but why it won’t show the subscription plan in my workflow when I click on the field?

nevermind everybody. I didn’t create a subscription plan in TEST environment… my bad! First time on stripe :).

2 Likes

@mvandrei

I am trying to setup a subscription as well and a few things are confusing. In stripes “subscription” AND “plan” are two different things. So do we first create a plan and when the customer purchases it , it becomes a subscription and is automatically charged each month ? (1)

Is the value of this plan dynamically visible in bubble ? I’d like to show multiple currencies and guess that means creating multiple plans in stripe and setting those plans via drop down in bubble? (2)

Thanks :slight_smile:

@Prashant

  1. yes
  2. not sure how that would work, you should submit a ticket to stripe to see if they allow you to charge and keep the value in different currencies. If that would be possible, then in bubble you’d need to ask one of the plugin creators for stripe to modify it so you can have this option.

Hi there, I’m having trouble setting this up too.

There doesn’t seem to be a “Subscribe the User to a Plan” option - is it create a subscription?

I read that I need to create a customer first, which I did and that worked. But then the customer ID option doesn’t come up when I try to create a subscription. I tried [result of step 1]'s id but it hasn’t worked.

Also I can’t get the plan to show up at all :frowning:

Lastly do we really not need to store the card or deal with the token? I watched the quick cobubble video but it doesn’t seem like theres a lot of documentation. I’m at a loss for the order this should go in. Is there any documentation I’m missing beyond the pages and pages of text on Stripe itself?

Here’s what I have:

Thanks for any help you can offer!

Where did you find your “client ID” on stripe??

In Stripe Dashboard, click Business (down at bottom of the menus on left). Your IDs are in there if I recall correctly. (Am mobile at moment not on desktop.)

(Yes, their interface is a hatful of crazy.)

I looked down there and nothing. Can you let me know where you see it? Thanks @keith

Ah… It’s in CONNECT > Settings:

Toggle the switch to get test vs live IDs.

1 Like

BTW, don’t forget to set up your redirect URL like I did!

Thanks @keith but this leads me to the next question. Connect is for 3rd party/marketplace sites.

I am only charging users after their 30 day trial period is up, exactly like your app. Do I even need to set up the connect then?

Basically, yeah, you need to. Again, this is a Stripe marketing/documentation/interface issue. They describe it all wrong.