#sean_event-signature
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/1300504395649384510
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
sean_event-signature
@umbral onyx I recommend reading https://docs.stripe.com/webhooks/signature end to end to understand what can cause this
Are those Events delivered to the same WebhookEndpoint or different ones for example? Are you properly using UTF-8 encoding?
We have reviewed the signature documentation and are stuck on what is causing our issue
We have 5 endpoints for the different object types we consume events for. We updated our config to include SetupIntent for the Customer endpoint we already validated as working and we have the same behavior
If a single endpoint properly validates the signature for PaymentIntent events, but fails validation for SetupIntent events then I would assume the encoding is correct.
That assumption might not be true though. Some Events might have characters that the other doesn't that break your code for example
Can you share 2 example Event ids: one that works and one that errors?
Do you mean characters in the body of the event?
yes
Yes, one second
Sorry that is not correct. One second
Failed Event - evt_3QDp1pJmyu3lEqhg1n5NLKLv
Successful Event - evt_1QDBQTJmyu3lEqhgLiX1ncpO
you pasted duplicate Event ids ๐
And I misspoke in my original message. PaymentIntent and Charge are failing
Customer, SetupIntent, and Payout are successful
LOL
Sorry about that. Updated
yeah so you see that failed Event has details such as an email address in there. So I wouldn't be surprised you have an encoding issue on your end that causes the signature verification to fail. We need the exact raw payload that we send you to verify the Event, any change to the content, including encoding, can fail verification
OK, I need ot verify our APIG and SQS configuration in AWS because that is how we consume the WebHook events
yeah it's possible
It will take a little time to look through that. In teh meantime I will have one of my other Devs work on outputing the Event Payload we get within our Lambda function and we can see if anything in the payload might look incorrect compared to the Event messag in Stripe
I guess it is suspicious since Charge and PaymentIntent payloads are more similar to each other and are the ones failing
yeah unfortunately this is really hard to debug especially just visually ๐ฆ
yeah sorry we know nothing about those parts as it's specific to your integration. The closest we have is the https://docs.stripe.com/webhooks/signature#aws-api-gateway-with-lambda-function doc but that's the extent of how we can help ๐ฆ
So if this is accurate we are using UTF-8
OpenAPI Definition: Make sure your API Gateway's OpenAPI definition file specifies UTF-8 encoding for text payloads1
. This is typically done by setting the Content-Type header to application/json for JSON payloads2
.
Because we are using the application/json content type header
possibly. Sorry I have no way to help you with the AWS specific part unfortunately
Can you try locally without AWS at all and debug your code to confirm it works as expected? This would help you narrow down the issue
That will take a little more work on our end since we consume everything from SQS