#luke.hatakeyama
1 messages ยท Page 1 of 1 (latest)
Interesting. Can you share an event id (evt_123) of an event where delivery was successful and one invoice.paid event id where it failed?
sure
checkout.session.completed, gets validated properly : "evt_1NXVYiC7VbsPBu2XyWFtoqCG"
invoid.paid, gets signature exception : "id": "evt_1NXVYiC7VbsPBu2XotIxH6CQ"
they are both triggered by the the same "checkout" event
Interesting. And you checked server logs to identify it's a signature verification issue?
What message did you see exactly?
yea
i debugged through it as well
i didn't screen shot the validated request, but the checkout session webhook gets processed because we don't hit this exceptioon
Ok. Can you share your webhook endpoint code?
sure here's the main handler :
this kept happening, i tried on 3 different accounts
i haven't tried since last week though
but I tried our official company account in test mode, and two of our devs created personal accounts to try testing too.
we all connected to this hosted endpoint, would change the signing key accordingly (and other secrets / priceid / config values), and would get the same issue
But if its not a recognizable bug on your side, i can double check... maybe for some reason for only the invoice.paid requests, we're changing the body when we receive it, such that when we sign it, we get the wrong signature
We're also going to try it out in production, and see if we get the same error
๐ hopping in here to take a look as well - give me a minute to catch up
hi! thanks you both for helping
Are you making sure to treat the event payload you get as UTF8?
That would be my guess of why it's failing - the Invoice line items have a description like "1 ร product", where the "ร" is a specific unicode character
My guess is that you're not handling it has utf8, and so it's being changed to an invalid character, which changes the payload
okay that's good to know, lemme look into it
Yeah I'm pretty sure that's what it is - if you look at that screenshot you sent over with the signature verifcation error you can see that the "description" looks a bit wonky
๐