#Alain
1 messages · Page 1 of 1 (latest)
Hi there
Can you share your webhook endpoint code?
It sounds like your signature verification is failing
Here the following code in python which is working in test mode :
Which is likely due to your server manipulating the raw body in some way
But let's look
Yeah so see how you are using request.body()
That is likely the issue
You should just be using request.data
If you manipulate this body at all then the verification will fail
The other thing to check on is that you are using the correct endpoint secret
Did you change that to your live one?
yes I'm using different variable environments
ones for the test mode and other ones for the production stripe mode
what I was struggling to understand is why this exact same code was working in stripe test mode even with the 'request.body()'
Are you using the same server in test? Or you were testing locally?
I'm using the same server for the stripe test and live mode
just using different server variable envs
Hmm then I'm not sure. Something had to have changed.
First thing to do would be to switch back to test mode right now and run another test
Without changing your code
And see if that succeeds
Yes it succeeds
already tried that 15 mn ago
what I plan to do is to try with your suggestion : request.data in test mode
and then to switch in prod mode
and see if it works
Yeah that would be a good thing to try as well
Very strange that it succeeds in test but not live. It makes me think that it may have to do more with your server config variables than your code
But worth trying what you are proposing
I'll make an update in this thread as soon as I ran the test
Sounds good