#saintlike_webhooks

1 messages ¡ Page 1 of 1 (latest)

sinful aspenBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1409555867103400037

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

carmine thunder
#

Your end point is set to https://showmeyoursaas.com/api/stripe-webhook but then tries to redirect to https://www.showmeyoursaas.com/api/stripe-webhook via the 307

#

You cannot redirect delivery like that

#

you need to either disable that redirect and accept directly, or update your endpoint configuration to the new/redirected URL for direct delivery without redirect

last forum
dire walrus
#

So i changed the webhook endpoint to include the www. also added it for the redirect url on payment confirmation js const { error: stripeError } = await stripe.confirmPayment({ elements, confirmParams: { receipt_email: email, return_url: `https://www.showmeyoursaas.com/checkout/success`, }, })
Now i get a 400 error:

"error": 
"No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? If a webhook request is being forwarded by a third-party tool, ensure that the exact request body, including JSON formatting and new line style, is preserved. Learn more about webhook signing and explore webhook integration examples for various frameworks at https://docs.stripe.com/webhooks/signature ",```
#

here's the new evt_id for 400 error - evt_3S02QlQlxuTOhr2i1QU8hE5B

sinful aspenBOT
last forum
#

That typically means that your endpoint secret isn't the correct one or that your framework is processing the webhook body before passing it to the signature verification call (that call needs the raw request body). This doc has a good steps for debugging that error:
https://docs.stripe.com/webhooks/signature