#ddbg - refire webhook event

1 messages · Page 1 of 1 (latest)

ruby wharf
#

I believe so. Checking now...

rare rune
#

Thank you very much @ruby wharf !

#

Yes I could do it before, but can't find out how to do now :/

ruby wharf
#

But for events without attempts already, I am not seeing the button.

rare rune
#

Thanks for the link @ruby wharf !

#

In my case the hook has been received and returned with 200 code to stripe, in that case is it possible to refire a "succeded" webhook?

ruby wharf
#

According to that SO answer, yes

Note that for events which succeeded, you can still resend them by clicking the ellipsis and then "Resend" (this is a newer feature).

#

It is the bottom event in that pic

rare rune
#

Ahh just found it!!!

#

thank you @ruby wharf !!! 🙂

#

but the problem is I can go before the 24th of April (the event was on the 12th) :/

#

the event is : evt_1KnmGYFxsE4pn4oa3yRW6Msj

ruby wharf
#

Interesting, as long as it is within the last 30 days, it should be possible to resend it. Though I think that after 15 days some of the data is no longer retained as well.

#

Is it giving you some error about how old the event is?

rare rune
#

no it's just I can't reach before the 24th of April :/

#

I can still find the event data with its id (evt_1KnmGYFxsE4pn4oa3yRW6Msj)

#

just on the page with the customer's events, I can go before the 24th :/

ruby wharf
rare rune
#

there's no resend button :/

ruby wharf
#

Ah, it looks like the data that this relies on is not retained after 15 days so we will need to retry something else.

#

Are you trying to trigger something in your system or are you trying to test something about that event?

rare rune
#

I'm trying to fire again that event because at that time, we didn't handle and triggered all the process that should activate by receiving the event

#

Now we just implemented and have to re-fire the hook to update my customer's products

#

is there somebody? :/

ruby wharf
#

Unfortunately there isn't a way to resend that specific webhook event. You will need to trigger that flow otherwise

#

It is hard to say exactly how, that would depend on your setup.

rare rune
#

what do you think if I paste the body of the event to my webservice that listening to stripe's hook?

#

is the signature inside the event's body?

ruby wharf
#

Two options I can think of:

  1. Create a new Invoice that is like that one and mark it as paid out of band
  2. Deserialize the json of that invoice object and send it through your system.
#

If we are thinking of the same signature, it is actually one of the HTTP headers that we send along with the event.

#

That being said, you probably will not be able to use the constructEvent function here as the signature there relies on the timestamp of the event being send

rare rune
#

thank you @ruby wharf , I'm really not sure to get everything, is there a easier way?

ruby wharf
#

There isn't really an official Stripe way to do this at this point. It mostly depends on what your system looks like and how it can take in this data if not directly from a webhook event.

#

Would it be possible to just retrieve this invoice by its ID in your code and then pass that Invoice object to your code that processes the invoice after the webhook code constructs the invoice object?

rare rune
#

Thanks a lot @ruby wharf, I think that we will wait for the next invoice event, it's too risky for us to add some codes on prod just for that event :/