#Sayid
1 messages · Page 1 of 1 (latest)
What exactly do you need help with, can you share some details about the issue?
Thanks so much
So im setting up stripe webhooks
and I have both test and live keys
Im testing locally
When I use the test keys in my .env everything works fine my webhook end point gets triggered
But when I switch to live keys nothing
can live stripe keys like / NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY and STRIPE_SECRET_KEY be used to test locally
Are you encountering any specific erroers you can share?
Live keys can only be used over HTTPS and i don't believe you can use localhost
No errors just a non responive webhook
but if you have a way of accessing your test page over a named host and https they should work, though i worry about what you're doing
Generally you should not be testing with live keys
What are you trying to do / test? Why not use test keys?
Whats the error?
Webhook Error: No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe?
Learn more about webhook signing and explore webhook integration examples for various frameworks at https://github.com/stripe/stripe-node#webhook-signing
Ok, well that's very different
You're hitting issues with signature verification
This is working in test mode, correct?
When we have test keys and on local host yes it works
So then, are you replacing your webhook signing secret when switching to live mode?
Your live endpoint will have a different signing secret than your test mdoe endpoint
Thats another thing
we have the same signing secret
and it wont change
when I run stripe listen --forward-to localhost:3000/api/stripe/webhooks
in my terminal
it gives the same sercet
That's going to be test mode events though
I'm not sure if listen support forward live events, let me check
Hmm the docs do list --live as an option, so you can try adding that
If that works, yea -- but really you don't want to be doing this part for live mode anyways
If you really need to smoek test this it should be in a deployed staging environment with a public https address
and then you could point your Stripe webhook endpoint there instead of using the CLI to forward
Thanks soo much it finally works
Nice!