Setting up a subscription using Bubble’s Stripe plugin. The basics are no problem and working fine: connecting to Stripe, adding a payment method, and creating a subscription for the user. My problem is updating the bubble db once the subscription is created.
In my bubble db I have the following data types:
- User: Contains several fields including a Stripe Plan field of type Stripe Plans (below)
- Stripe Plans: Contains several fields including Stripe Price ID (price_1JaOblahblahblah in Stripe)
- Stripe Invoices: Captures data relevant to the invoice like Invoice ID, etc.
- Stripe Payment Methods: Catpures data for the stored payment method, like Payment Method ID, Last4, etc.
When a user creates a subscription, I want to update the bubble User with the plan they have subscribed to using the Stripe Price ID (the one that is price_1JaOblahblahblah in Stripe).
I have tried creating several different stripe webhooks using several different events (in separate webhooks).
Each of these webhooks contains the data value I need (the Stripe Price ID), but in the Bubble API workflow, it will not let me reference that value (it isn’t in the list).
Once I am able to get that Stripe Price ID, I can create a workflow to update the User’s plan, but I can’t seem to get it. It appears as a list item in the webhook data. Are list item values not accessible in the Bubble Stripe Plugin?
Is the problem the Bubble Stripe plugin? Is it that I am dynamically detecting values and I should be manually entering the parameter for the list it I need (if so, what is the format of that)? Should I instead use the stripe.js plugin? Should I setup an API call to Stripe using the regular Bubble API connector to get this value?
Any help would be really appreciated! Things were going great until I hit this and none of the tutorials out there seem to address this issue.