#4e656f

1 messages · Page 1 of 1 (latest)

late emberBOT
gritty fjord
#

I'm confused. What's your question?

full falcon
#

Why i don't get console.log im my route.ts

gritty fjord
#

What does your listener show when you trigger an event? Can you copy/paste the output?

full falcon
#

It gives me this:

2023-12-12 19:52:17   --> charge.succeeded [evt_3OMb3zElNHG3Wsnf0ZNXcGIv]
2023-12-12 19:52:17  <--  [307] POST http://localhost:3000/api/stripe/webhook [evt_3OMb3zElNHG3Wsnf0ZNXcGIv]
2023-12-12 19:52:17   --> payment_intent.succeeded [evt_3OMb3zElNHG3Wsnf02syonrf]
2023-12-12 19:52:17  <--  [307] POST http://localhost:3000/api/stripe/webhook [evt_3OMb3zElNHG3Wsnf02syonrf]
2023-12-12 19:52:17   --> payment_intent.created [evt_3OMb3zElNHG3Wsnf0WoHbaBM]2023-12-12 19:52:17  <--  [307] POST http://localhost:3000/api/stripe/webhook [evt_3OMb3zElNHG3Wsnf0WoHbaBM]```

when i click does link it redirect me to ```https://dashboard.stripe.com/test/events/evt_3OMasPElNHG3Wsnf1jKEmExy```
gritty fjord
#

Where in your code do you define /api/stripe/webhook as your route?

full falcon
gritty fjord
#

The temporary redirect HTTP 307 is a bit confusing. Have you tried listening to the https version of the endpoint? So running this instead: stripe listen --forward-to https://localhost:3000/api/stripe/webhook

full falcon
#

i get error when i add https:

2023-12-12 20:05:53            [ERROR] Failed to POST: Post "https://localhost:3000/api/stripe/webhook": http: server gave HTTP response to HTTPS client      

2023-12-12 20:05:53   --> payment_intent.succeeded [evt_3OMbHAElNHG3Wsnf0JivHE2B]
2023-12-12 20:05:53            [ERROR] Failed to POST: Post "https://localhost:3000/api/stripe/webhook": http: server gave HTTP response to HTTPS client      

2023-12-12 20:05:53   --> payment_intent.created [evt_3OMbHAElNHG3Wsnf07sO1gVh]2023-12-12 20:05:53            [ERROR] Failed to POST: Post "https://localhost:3000/api/stripe/webhook": http: server gave HTTP response to HTTPS client      
gritty fjord
#

Hmmmm...

#

So the issue is that Stripe doesn't allow redirects for endpoints. I'm not sure what in your integration is causing a temporary redirect to happen, but whatever it is, you'll need to disallow redirects completely so that the webhook can directly access the endpoint

full falcon
#

Was to lazy to code a custom checkout page that why i wanted to use the stripe nocode and listen to the event using webhook.
is there any other way to listen to stripe event other than webhooks?

gritty fjord
#

No. You can view the events in the Stripe Dashboard, but you won't be notified of those for the most part