#manticpixel_api

1 messages ยท Page 1 of 1 (latest)

bold grailBOT
#

๐Ÿ‘‹ 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.

mild dune
plain sorrelBOT
mild dune
#

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

sterile zinc
#

@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.

mild dune
#

Would Python be better? I can just as easy make a flask app

sterile zinc
#

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

mild dune
#

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

sterile zinc
#

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

mild dune
#

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

sterile zinc
#

amazing