when it does works (subscribe to a plan), bubble doesn’t seem to be talking with Stripe because the values in current user - > stripe subscription are all empty so can’t fetch status or any details about the subscription.
The cancel plan workflow doesn’t work, I get a popup from bubble saying the cancellation was successful but it doesn’t cancel in Stripe. Again suggesting that bubble is not connected to stripe.
I’ve reported this issue a lot of times as I’ve encountered this with several projects. The way I solved it was by adding another email type value based on the user’s input on stripe.
A great way of verifying data is through webhooks. Stripe customers are automatically linked by their unique ID, you can use bubble’s internal Current User’s dropdown functionality to look it up. Use this ID to verify their account details against the webhook information.
Long story short, it’s not an ideal situation but workable.
Hi folks, It seems to be “mostly working”, although I am seeing the same issue as above with passing email to V3 checkout. Also running into issues pulling data back from Stripe using the “Current Users Stripe…” @emmanuel, should we be reporting these issues to support@stripe.com and not Bubble?
I suspect that the Stripe plugin V3 uses the client-only integration to accept one-time payments (https://stripe.com/docs/payments/checkout/client#prefilling-customer-email). This has a number of limitations, including no coupons. There should be no reason why the email address isn’t being passed though nor should there be a reason why we can’t pull standard API customer and subscription data. I am exchanging emails with support about this now.
It looks like some other users reverted back to V2 for more flexibility and reliability…
Ok, for anyone else having these issues, @jon4 was right, the best work around is to use the below plugin. In fact, I say ‘workaround’, it’s FAR more convenient and pro looking to simply use stripe’s customer portal for cancelling, updating, etc vs recreating all the subscription management interfaces yourself. Can’t believe we didn’t realize this existed before!
Bear in mind, it’s not super clear so took me some fiddling to get this plugin working. You must literally insert the text 'Bearer ’ infront of your API key in the plugin management area for this plugin to work - NOT ‘Authorization: Bearer’ as per Stripe documentation - as well as the domain to return to when users are done with the portal in the field below. Then follow the steps very literally (step 1, create stripe portal and feed it the relevant customer stripe ID, step 2, Open external URL using result of step 1).
It’s also worth figuring out Stripe webhooks to Bubble endpoints as that’s a reliable source of Customer and Subscription activity data. It is beneficial to also understand how to pull in data from Stripe’s API as the only info I could get from the native Stripe plugin was Customer ID.