#elporter - webhook
1 messages ยท Page 1 of 1 (latest)
I trying to use the webhooks in production ambient but it's not working well, trough me an error
this in console of stripe dashboard webhooks: Stripe.StripeException: The signature for the webhook is not present in the Stripe-Signature header.
I'm trying in test mode btw
Ok. Can you share an event id (evt_123) where this is happening?
Ok I see. Now, can you share your webhook handler code?
(Leaving out any secret keys)
No this is fine
One minute
Ok. Where are you running this code? Is this local with the CLI?
no, i've done published this on my server
but i tryed it before en local with CLI and it's works
https://webhookstripe.yalocobro.com/api/Webhook
with this url
Ok. So you need to verify endpointSecret is set to whsec_..... that is retrieved from the dashboard. The value will be different from the one you got from the CLI, so double check it matches the one on the dashboard for the webhook endpoint you are using/deployed.
Signing secret it's the same on my code
it's already worked ๐
did you did something?
no, anything changed ๐
well thanks for your help listening xD
just one more thing, you know why the events emit twice?
i send an email when i subscribe but it's send twice
Can you share both event id's?
Need to verify if it's duplicate events or your code sending that email twice
evt_1LPpqLKepL2u5KJefGU3u2VF
just one has created
So yeah that would be a bug in your code sending that email twice then
i calling the event emiter once
๐ I'm hopping in since @sacred scroll has to head out soon
okay
Have you done some basic debugging/added logging to confirm that both of these emails were sent for the same event evt_1LPpqLKepL2u5KJefGU3u2VF?
On our end I can see that we've only sent it to your endpoint once - can you try testing again a new subscription and see if you get the same behavior?
yes, some reason it's duplicate the calling
evt_1LPq6XKepL2u5KJeS6txHhcB
Then there's definitely something in your code that's accidentally duplicating this - you need to dig around in your own code and find why you may be processing it twice
๐