R
Railway3y ago
demo

Does railway do any modification to incoming request bodies? Failing to validate stripe signatures.

This is a less railway-esque question but I am having some issues developing a stripe integration for a project I have deployed on railway. Stack
Python - FastAPI, stripe-python
Python - FastAPI, stripe-python
Problem
When validating stripe requests using their provided python library I am getting SignatureVerificationError's. These errors surface when the provided request body does not match the signature stripe provided.

I am fairly certain my implementation is correct because I have two webhooks configured via Stripe. One points to my local machine, the other points to my railway service. My machine successfully processes the stripe webhook while the Railway service is unable to verify the signature.
When validating stripe requests using their provided python library I am getting SignatureVerificationError's. These errors surface when the provided request body does not match the signature stripe provided.

I am fairly certain my implementation is correct because I have two webhooks configured via Stripe. One points to my local machine, the other points to my railway service. My machine successfully processes the stripe webhook while the Railway service is unable to verify the signature.
Expectation
I expect the behavior between the locally executed repository and the remote to be the same.
I expect the behavior between the locally executed repository and the remote to be the same.
Project ID: d604ae57-452b-43f3-9f81-fb085605c65a/service/8ac5f605-42bd-4f1a-8df8-42cd98f96173?id=169ff06f-5a92-4daf-95f9-533efdfb1e091
2 Replies
milo
milo3y ago
no railway doesn't modify it
demo
demoOP3y ago
Thanks for the clarification. Issue resolved by me. There is a different webhook secret provided for each webhook, leading to this discrepancy.
Want results from more Discord servers?
Add your server