Why is My User Status “Paid” Instead of “Active” After Successful Stripe Payment?

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?

What do your workflows currently do?

It’s obvious that your invoice.paid WF changes User’s status to Paid - which is presumably not what you want it to do - so change it to do what you want it to do.

As a FYI, Stripe has the following values as the status for a subscription. If you’re getting something else, it’s likely due to your logic in Bubble.

Possible values:
incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaid, or paused

See: The Subscription object | Stripe API Reference

We added an additional field to capture a simplified status for ease of use that just marks it a subscription as active or inactive.

You should probably adjust workflow logic in Bubble

Have you set “invoice.payment_failed” and “customer.subscription.deleted” workflows to make changes to User’s status as “not active” and “invoice.paid” to make changes to User’s status as “active” ?

This topic was automatically closed after 70 days. New replies are no longer allowed.