Hi everyone,
I’m building a standard SaaS platform in Bubble, and everything works well so far. When a user purchases a subscription, I update their status in Bubble to “active.”
I wanted to run a simple test: I manually changed the user’s subscription status to something else, and expected it to revert back to “active” on the next successful billing. However, after the payment went through, the status updated to “paid” instead of “active.”
These are the Stripe webhooks I currently have enabled:
Customer
customer.subscription.deleted
Occurs whenever a customer’s subscription ends.customer.subscription.updated
Occurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active).
Invoice
invoice.paid
Occurs whenever an invoice payment attempt succeeds or is marked as paid out-of-band.invoice.payment_failed
Occurs whenever a payment attempt fails (e.g., declined card, no balance, or expired card).
I’d like the following logic to happen:
- If the payment fails for any reason, the user status should change to “not active.”
- If the payment is successful, the user status should be “active.”
Can someone please let me know if I’m missing any webhook events or if I should adjust my workflow logic in Bubble to better handle this?