#Codex-invoice-events

1 messages · Page 1 of 1 (latest)

woven maple
#

do you have the Invoice ID?

fringe swan
#

Yes, this one did not send an invoice.payment_failed event: in_0Ke5L3uagHrUveG4NFxKyhFO

#

And for reference, this is a normal failed payment that did send the webhook event: in_0KfbE4uagHrUveG4s9QP5TCN

woven maple
#

thanks, digging

abstract sparrow
#

Hey @fringe swan, stepping in here for @woven maple as he needed to step away. So this looks to be the result of the fact that the invoice.payment_failed webhook is emitted asynch once the next attempt is scheduled. This next attempt isn't scheduled immediately due to the "smart dunning" feature, where we figure out the best time to do the next retry. Sometimes this can take a couple minutes for the event to be emitted, but in the case of the above invoice the Subscription was canceled and the invoice was closed before that event was emitted so the event never happened.

fringe swan
#

Oh, that makes a lot of sense. Is there any way to tell if Stripe cancelled the subscription, or if it was from my company’s side?

#

Sine it looks like the subscription was cancelled the same minute

abstract sparrow
#

Looks like it was canceled from your end via the API. You can take a look at req_JAUK6cJlM8AhcX for the cancellation request

fringe swan
#

Thanks for the help!