#birdy247

1 messages ยท Page 1 of 1 (latest)

wraith stoneBOT
misty timber
#

acct_17G6e9FPwhhLLfF4

evt_3MgmESFPwhhLLfF40vbtwrDv

lavish portal
#

๐Ÿ‘‹ happy to help

misty timber
#

On looking at the account through the stripe dashboard, it says the webhook failed but doesnt show any attempts

lavish portal
#

hmm interesting

#

my bad, the attempts are only available for the past 15 days

misty timber
#

Oh

#

Can you see why it failed?

lavish portal
#

we received a 500 error

#

you should look into your internal logs to see what happened

misty timber
#

So no way we can replay this now?

#

I have just seen we can ๐Ÿ™‚

#

Can we possible replay this webhook to a local end point?

lavish portal
#

you can choose to which webhook endpoint you want to resend with the --webhook-endpoint flag

misty timber
#

If we have used stripe listen through the CLI

#

will it be replayed here by default?

#

I know I have done this before, but cant remember how

#

i.e. where live webhooks arrive in our local env

#

Got It ๐Ÿ˜„

lavish portal
#

stripe listen --forward-to ...

#

but I'm not sure you can resend the event to that

misty timber
#

Can a successfull webhook be replayed?

lavish portal
#

I guess so

misty timber
#

I successfullr replayed one to my local endpoint

#

But cant replay a successful one

lavish portal
#

usually you can

misty timber
#

These are klarna payments

#

i.e. this wont work

#

evt_3MikItFPwhhLLfF41jpntr0v

lavish portal
#

it was resent

#

twice

misty timber
#

But I never recieve it

#

Other ones we do

#

i.e. payment_intent.created

bleak meadow
#

You're re-sending to a local endpoint, yes? What does your stripe listen command look like?

#

Because evt_3MikItFPwhhLLfF41jpntr0v is payment_intent.succeeded, but you say you're receiving payment_intent.created events. Maybe you're not listening for .succeeded?

#

i.e. stripe listen -e payment_intent.succeeded,payment_intent.created -f http://your.local/endpoint

misty timber
#

stripe listen --forward-to www.eventrac.local/webhook/stripe --live

#

We are getting loads of events to our local listener

#

These include payment_intent.succeeded

#

BUT if we replay a payment_intent.succeeded that was paid with klarna, it never arrives to our local endpoint

bleak meadow
#

Then I suspect the issue lies in your code

misty timber
#

I disagree

#

Because the same event made with a card or link arrives fine

bleak meadow
#

I suggest you add some logging your endpoint(s). If the CLI is forwarding them to whatever www.eventrac.local/webhook/stripe then you need to confirm that they're actually arriving in your handler

misty timber
#

I confirm they are not arriving in our handler

bleak meadow
#

We've no insight into the outcome of events forwarded by the CLI (they all report as 'success')

#

Then I'm not sure unfortunately

misty timber
#

Are you sure this isnt expected your end?

bleak meadow
#

Is what expected?

#

You can see the CLI receiving and forwarding the events in your prompt yes?

2023-03-17 10:13:57   --> payment_intent.succeeded [evt_3MlvO4BDB9fVNtrX019q4KvT]
2023-03-17 10:13:57  <--  [200] POST http://localhost:3000/api/stripe/webhook [evt_3MlvO4BDB9fVNtrX019q4KvT]
misty timber
#

When i replay this event, it never shows in this log no

#

Others do

bleak meadow
#

Can you share:

  • The command you run to resend (stripe events resend).
  • An example of a evt_xxx you are receiving.
misty timber
#

stripe events resend evt_3Mgvm9FPwhhLLfF408sJsd1h --account=acct_17G6e9FPwhhLLfF4 --live --api-key=sk_live_xxxx

#

That event never shows in these logs

bleak meadow
#

So you don't receive evt_3Mgvm9FPwhhLLfF408sJsd1h? But do receive evt_3MmaYjCt3m4r281r0gA04UgL?

misty timber
#

yes

#

I just tried listening with --latest

#

I think that may have done it

#

Yes ๐Ÿ˜„

#

I guess I need to understand why that works and if its anything we need to worry about on prod