#akashpatil7596_webhooks
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- akashpatil7596_webhooks, 21 minutes ago, 21 messages
- akashpatil7596_api, 1 day ago, 143 messages
- akashpatil7596_webhooks, 3 days ago, 18 messages
- akashpatil7596_api, 3 days ago, 22 messages
- akashpatil7596_api, 3 days ago, 18 messages
๐ 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/1233365731727638590
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
No I don't even know what does that means?
@amber furnace there's a limit to what we can help you with on this channel
you need to either add logs to your sever or add more details to the response you send to Stripe
anyways 400s are basically related to signature mismatches
if you don't have problem with your local listener but you have on your registered endpoint it might be because you're using the wrong webhook endpoint secret
No I'm using exactly the same your colleague suggested
using what?
the webhook secret looks like whsec_xxxx
if that's not what you're using then it's not the right one
please don't share it publically
and did you deploy it?
okay sorry
Yes
that's the one you're using whsec_NdgKixxxEZZHD ?
could you share your code please?
if you're try catching in the calling function you don't have to try catch in this function
otherwise the error message won't be logged
Sorry I don't understand
remove the try catch from this function
and retry
or instead of return error, do throw error
okay
I think It's validating the webhook
but still
man... ,what is the issue
I'm using stripe secret key of my test account, is that right?
instead of doing res.sendStatus(400); replace that with
res.status(400).send({
webhookSecret: <copy the one from the first console.lolog>,
message: err.message});
this way we can be sure to know which secret and what the error message
on the Stripe Dashboard
I'm getting this in log
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
you're using the CLI whsec ๐คฆ
My colleague is suggesting, now that you've printed out your webhook secret, it is evident that it's not the one you were supposed to use, as was suspected earlier. Hence the errors.
oh yes sorry
Now I change it
but still
Can you tell me what have I doing wrong?
I can't see anything here what would help me investigate the issue.
The error is in your server logs.
@amber furnace you're using ngrok right?
are you still running the ngrok command? did it stop at some point? did the URL change?
the reason why I'm thinking about that, because I just saw something we all missed which is the Timeout error in the event's Response, which means that Stripe tried reaching your webhook URL and it didn't find it
another thing that might be wrong is something you didn't share in your code
would you mind sharing your webhook endpoint code (as text rather than images please)
just the stripeWebhook function
the logs in stripe dashboard still shows 400 or timeout but somehow my code starts working
I mean the code after validating the webhook
ok then the new 400s must be from the stripe CLI
means?
you shouldn't run stripe listen and register a webhook that reference the same code base