Struggling with Stripe Webhooks

Hello,

So I need help with finishing up my Stripe integration. I’ve mostly watched videos on Youtube and seen some tutorials on blogs but each is a little different so now I’m confused.

I got Stripe integrated in the sense that I can take payments and when they are successful, their account gets upgraded to pro (I offer 1 pro version and they can either do monthly or yearly).

My problem, I’m can’t seem to get webhooks setup correctly. I started, but just can’t get it finished.

How to check on the renewal date if payment was successful? Then update the correct fields/dates.

Also, how does payment retrying work if the payment did fail?

How do you downgrade their account until they do pay?

Basically looking for what I’m missing to make sure Stripe and the app stay synced.

Like I said, I used multiple tutorials, so I’m not sure if everything I created is necessary or being used correctly.

stripeCustomerID: (Not actually being updated)
stripeCancelEnd: Can’t remember what this was suppose to be but they all say “no”
stripeSubId: stripe subscription id (working good)
stripeSubStatus: stripe status, active, trialing, notActive (Sets to trialing at the start, but doesn’t update. )
subscriptionEnd: current period end date (Seems to be showing end up trial period and not updating at that time)
subscriptionStart: date trial ends. (Currently not being populated or updated)
lastPaymentMade: date of last payment, first payment would be day trial ends
usedTrial: So they can’t keep getting trials by downgrading and upgrading. Not setup right.




Watch this video-

and this one-

Most of your doubt will clear out

Ankur@ Nocodetalks
Looking for a Bubble Coach? Checkout here