#.borjasanchez
1 messages ยท Page 1 of 1 (latest)
Hi
Well, once all the events arrive to my webhook is very confusing, I'm trying to debuging, but the code flow is bouncing randomly between events back and forth
Could you please share more details about this? why you can't debug your code ?
Hi !
Well, my understanding is that when I created a checkout session a lot of events are created and send it to the webhook ...
But
Once the event enters in case "customer.subscription.created": ... in the middle of the proces jumps to another event ... like case "checkout.session.completed":
Both events need to coexist in the same call ... but ...
Is like everything is happening at the same time.
It is impossible to debug to check if the event is doing what it's supposed to do.
๐ฌ
those events are just examples, it happens with every case I have...
It is impossible to debug to check if the event is doing what it's supposed to do.
that 'll depends on your integration/framework
You can drop/focus on a single event type at once.
how ?
It depends on your integration how are you listening to events
For example here in this quickstart:
https://stripe.com/docs/payments/quickstart
You'll be listening only to payment_intent.succeeded and payment_method.attached
so you can create an integration that listens only to checkout.session.completed
yes, and what is the issue/thing preventing you from debuging you rintegration ?
When I'm debuging and my debug line is in A, suddenly, jumps to B or C or somewhere else... and after that comes to A again... and after a couple of lines, jumps again to C, B, D, E etc....
Create only one break point and follow it's flow.
A, B, C are examples, there is no patterns.
Same thing ... jumps radomly
Yes you need to focus on a single flow at once.
in that case you may have an issue in your IDE.
that's right, but I can't
It just happens here ... I don't thinks so.
Try this command/cli in order to resend a single event
https://stripe.com/docs/cli/events/resend
When I send a single event works fine ...
No your IDE won't block the process on points that you didn't wanted to explicitly.
the problem is when several events happens at the same tieme (checkoutsession, subscription created, etc...)
Did you try to re-send an event at once, so that you stay focused on only one event/flow ?
No, let me try that
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!