#op84
1 messages · Page 1 of 1 (latest)
Stripe doesn't have separate test and staging environments
Can you clarify what you mean by these different environments?
i'm using my test account credentials to develop and run automated tests.. end those two environments don't share the same database.. i would somehow like to identify the webhook from which environment it comes from
One thing you could do is add a url parametr to your webhook endpoint that says which environment it's on, which you can then check in your webhook handling code
and how does it get set? i could identify the stripe account with it but not the environment..
When you create the webhook endpoint in the dashboard you'd literally set the url as https://<YOUR_URL>?environment=testing - and so all events will be sent with the environement=testing url param
yes but when an event gets triggered by stripe i'm not able to know from which environment it originated.. like my test env creates an order.. all webhooks get triggered for any env..
Can you clarify some more - how are you separating your environments right now? Are you sending all of your dev/test/staging environment all in the same Stripe testmode for a single account?
exactly thats what i'm doing..
Gotcha - I thought you were talking about differentiating between live/test mode within stripe. The only thing I could think of to try would to use metadata in all your requests (https://stripe.com/docs/api/metadata) so you can differentiate