#TheUchi007-events-fulfillment
1 messages · Page 1 of 1 (latest)
However, when I subscription is renewed, payment_intent.succeeded is no longer called
payment_intent.succeededshould still fire if the Payment Intent attached to the subscription's invoice is successful.
Do you have an example where this wasn't the case?
Yes. I am using the clock simulation feature that Stripe has, and that is how I am triggering the renewal. Attached is a screenshot of the events that happened during that time
Anything on 13:43 is what happened during the renewal
UPDATE
Ok, so it seems that the payment_intent.succeeded happens intermittently. Sometimes it gets called, sometimes it doesn't. Is there a reason for this?
Can you copy/paste the Event id for an event where a renewal event had an underlying payment intent succeed, but the event was not sent as a webhook?
Hmmm not sure if this helps, but according to my log, when this event was called:
evt_1LUwSzLDvlb4rPYaYjuii2EC
During that chain, there was never a payment_intent.suceeded
That event I posted is for a invoice.payment_succeeded
Also, I just got an instance in which no events even fired up. Again, this is all from the clock simulation part, so not sure if this is a bug, or if this has the potential to happen on a real scenario
Taking a look now
And do you have a payment_intent.succeeded event that fired for a renewal?
Thank you. two-shoes had to step out but I can check in to that event in a minute
Awesome, thanks
It looks like there was an event for this payment intent succeeding but your endpoint didn't receive it. Not sure why the CLI endpoint wouldn't have received it though. https://dashboard.stripe.com/test/events/evt_3LUwSpLDvlb4rPYa0R0xOZEZ
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Looking to see if I can see more on that...
Ah ok, so it did happened, it just didn't go through.
Is it because it is a local CLI?
Also, what event, essentially, would trigger whenever a successful payment is made and added to Stripe?
It is my assumption that it is payment_intent.succeeded,but want to make sure
Like, what event will always trigger upon a successful payment
I am not sure why this didn't send but yes payment_intent.succeeded is typically the cannonical event to use for when payments succeed (unless you are on an older integration that only uses charges)
Can you try again with the CLI still running to see if you don't receive it again? I am still not sure why you didn't get it here
Ok, let me try to usethe testclock again
Ok, everything went through without a hitch
My main concern is that, if this happens on production, it could cause me some issues with the referral system
Like, an event not triggering I mean
In production you should always get these events. This was very likely CLI or test clock weirdness
And even here we logged when the event didn't send properly, so the event would be resent until your endpoint responds as per our retry logic
Ah ok, got it. Yeah, I get intermittent results still on local
Have you seen this lack of event for other events or just this payment_intent.succeeded event?
Yes, tho I don't really need them for now, but I sometimes don't get transfer.created
I can see the transfer did went through because I can see that balance added to the connect account
but I sometimes just don't get that event being triggered
It is worth noting that this issue is happening only when I test the renewal
First time payment on a sub works perfect
As well as a normal payment
Gotcha, from what I can see, Stripe is always generating these events so not receiving them may be network related or some similar break in the chain down the line. I will consult my colleagues on debugging intermittent CLI issues like this and will try to get back to you with next steps
Ok, so it might have been on my side. After doing troubleshooting and such, I found that I don't always get the customer ID on all events
Everytime an event comes, I try to retrieve the customer ID data
most specifically, the metadata
Ah so it is erroring out if that value isn't present?
Good catch
I just fixed it and it seems to work well now
Nice!