Please can someone help me figure this out. I have a webhook in Stripe Listening for customer.subscription.updated which triggers when a user/customer unsubscribes/changes their subscription. I am not sure what it will return, probably a date.
I have prepared my User database with a field called “Stripe Subscription Updated”
On closer look, I’m a bit confused by your screenshot here…
Firstly, if this is an API endpoint, receiving a webhook from Stripe, why are you making an API call inside it rather than using the request data from the webhook?
Secondly, it looks as though you’re using a Retrieve An Event call (I’m only guessing that based on the call name)? Why do that if you’re receiving the event via a webhook?
And thirdly, in the Get Stripe Event call, you’re not putting a valid Event ID…
So, I’m not entirely sure what you’re doing here, I’m guess that your end point is not set up correctly and hasn’t been initialized, and that you’re confused between using webhooks and making API calls (as you seem to be doing the latter whilst talking about the former…)
I hadn’t previously as I didn’t know how to, but have since watched a further 4 long tutorials and learnt how to! The initialization now works and the webhook is sent from Stripe, but I can’t seem to use that payload data to do anything, despite following a tutorial step for step.
I followed a detailed video like-for-like which sets up one website, the ‘status’ so that we know if a user is paying or not. Whilst everything looked good, webhooks initialized correctly, the status is always ‘active’ regardless of if they are unsubscribed.
I did try to request data (as in the image) but that didn’t work.
Secondly, it looks as though you’re using a Retrieve An Event call (I’m only guessing that based on the call name)? Why do that if you’re receiving the event via a webhook?
I have very little understanding of this so I am limited to following tutorials. I don’t know the answer to this question, sorry.
And thirdly, in the Get Stripe Event call, you’re not putting a valid Event ID…
Is customer.subscription.updated not valid?
Sorry for my vagueness, I have followed several tutorials but my results are not the same as theirs. I think I will have to find a freelancer because I feel I’ve tried everything I can.
@adamhholmes I have found a freelancer on Fiverr with 100% positive feedback rating with 113 clients. I am going to try him, I’m a little worried about giving my Stripe login info but I guess I can change this and create new APIs later.
No, that’s not an event ID (that’s just a type of event)… an event ID from Stripe should look something like evt_1KtRje********************, and be the ID of the actual event you’re trying to retrieve…
If you’re using an API call to retrieve an event then you need to supply the ID of the event you want to retrieve
Although I’m pretty sure that’s not at all what you want to be doing here (the event is being sent via the webhook - that’s the whole point of a webhook, so no need to retrieve it via an API call)
In that case I am not doing it correctly at all. I have instructed the freelancer to see if he can set it up, hopefully if I see it done once I will then know the formatting required.