#sree-testclock-events
1 messages · Page 1 of 1 (latest)
What have you tried so far?
i want the subscription to be cancelled due to some reasons like card declined. I added a user to test clock, added payment method, then added a subscription. Then I advanced the time by 1 month. In this case, I think the subscription will get renewed automatically. So I tried to remove the card but it was not allowing to do that
Maybe changing the card number will work?
Yes, try updating the PaymentMethod
when i advance the time, i dont see any new webhook actions
ideallyit should try to update subscription right?
If you're not seeing any new webhook events, you might not have advanced the time enough
sure what's the question?
Whenever the user makes a payment, payment_intent.succeeded event will be triggered right?
Yes.
For subscription payments, invoice.paid and payment_intent.succeeded would be generated once the payment is successful.
https://stripe.com/docs/billing/subscriptions/webhooks
I updated the subscription of a test user and payment_intent.succeeded was not triggered
Are you saying the event wasn't generated even though payment succeeded? Can you share the test subscription ID?
sree-testclock-events
sub_1NucEjSGtKVHB2p0y4KypKGz
You said both these events will be triggered
and both were https://dashboard.stripe.com/test/events/evt_1NudcySGtKVHB2p0yaM77jAR
I just gave one example since you said it wasn't. And really as a developer you need to ignore invoice.payment_succeeded entirely. It's old and deprecated, invoice.paid is the right one.
But ultimately both were generated as expected adn you can find them all in the Dashboard directly by looking at https://dashboard.stripe.com/test/events and filtering by type
Okay thanks for the info
But when i go to the webhook and see events, i cant see it there https://dashboard.stripe.com/test/webhooks/we_1KbnXhSGtKVHB2p0qtfJ5zlT
None of your webhook endpoints are configured to listen to those Events.
Oh sorry. the webhook was disabled
Do i have to change the invoice.payment_succeeded to invoice.paid immediately or it will still be supported ?
that webhook endpoint listens to a completely different Event: payment_intent.succeeded
If you are using Invoices you should not listen to payment_intent.succeeded at all
Please see my query
and payment_intent.succeeded would be generated once the payment is successful.
For that Event to happen, there needs to be a payment
I am using subscription plans. I want to get nnotified when a payment happens. Am i doing it right?
when a payment happens on a subscription
I'm sorry, you seem so lost right now and ask the same questions over and over but you don't look
https://dashboard.stripe.com/test/invoices/in_1NudcsSGtKVHB2p0E2pKgLtT this is the page for the Invoice. It has all the info
at the bottom it lists every Event generated, you can look all of them one by one which takes 2 seconds and gives you the full and complete answer
It's the same as me explaining earlier to look at the Events page and filtering by type
https://dashboard.stripe.com/test/events/evt_3NudcsSGtKVHB2p00j7A3PZr this is the Event
this is what it looks like, the 4th one on that Invoice page is what you want
Does all of that make sense?
Yes.
One more question. Is payment_intent.succeeded depricated?
Ypu have told "And really as a developer you need to ignore invoice.payment_succeeded entirely. It's old and deprecated,"
just wanted to confirm the same with " payment_intent.succeeded"
No that one is not deprecated but it's not the right one to use as a developer if you are working with Invoices and Subscriptions. Please carefully read https://stripe.com/docs/billing/subscriptions/webhooks a few times
your questions weren't dumb but you were too focused on that one thing and not looking at the tools that exists
I know it's not easy to take a step back when something seems broken but hopefully uou see the 2 ways to look at Events
you can also use our CLI tool https://stripe.com/cli and use stripe listen to see all Events happening on your account. It makes debugging Events a lot easier
sure thing!