#manticpixel_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1220871510093336647
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
This is all for google cloud. I am using the exact node/express code provided as a sample here in a docker container that runs on google cloud run: https://docs.stripe.com/payments/checkout/fulfill-orders
I have verified multiple times that my webhook secret and stripe secret are correct. I am using this all in test mode currently. Thanks
This is the code. I have secrets hard coded as I am just trying to get it to work. I will roll them and add them to a secret manager once it works
@mild dune unfortunately webhook signature verification can be extremely painful with Node.js because many things can get in the way of getting the "raw payload"
What you need to make sure of is that you use the right secret as it's specific to each WebhookEndpoint and then make sure you get the exact saw raw body/payload. Everything has to match: exact same space, comma, property ordering, etc.
https://github.com/stripe/stripe-node/issues/356 has dozens of potential options and sadly you'll have to go through them to find the right one for your setup/environment ๐ฆ
Would Python be better? I can just as easy make a flask app
It's hard to say sorry, it really depends on your environment and how you deploy and what is touching the data.
What I would do is log the exact event to a file and compare what I see on my local computer versus on my server to understand the problem
Fair enough...thanks for the info
Follow up, when you say log the event....what in my code would that be? event? because I do not get event populated as that is where the issue happens
Your code must be receiving the Event on your server. You are the one writing the code to check the signature and then erroring if it doesn't match. So before you do that, you can log what you received
Woot! I got it working. I used the new way to get raw express.raw instead of bodyParser.raw I guess for some reason it does not play nice with bodyParser
Thanks for your help
amazing