#dominik.sfl
1 messages · Page 1 of 1 (latest)
Hey, sorry let's continue here
Hey!
I was able to test my webhooks via stripe cli
as described here: https://stripe.com/docs/webhooks
And that works. But when i turn my CLI off and I am in localhost, it will still ping the live webhook on mywebsite.com
I set up some webhooks online in the dashboard.
This part is where you can choose mode
ok i will have a look now
If you create that webhook in Dashboard for Test mode, then any action occurred in your Test mode will send events to that endpoint
Well you can have different endpoints for Test mode and Live mode too
If i click
"Add an Endpoint"
I get this:
When I click "test in a local environment", i get the instructions for using stripe cli
When you click, you see a toggle on right hand upper corner
yes, i am in test mode the whole time
but i want to test on localhost without triggering my staging enviroment webhooks
when i am on localhost, i would like to only to fire to localhost:port/my-webhook
but right now its firing to the live webhook that i have configured in test mode
do you know what i mean?
Yes, but it doesn't make sense to have "live webhook that i have configured in test mode"
Test mode is test mode and you shouldn't consider anything in it to be "live"
I think you want test / staging / live endpoints
yes correct
lets say it like this: when i work on localhost, I change code in my webhooks all the time, so I dont deploy constantly, as I am still figuring things out. However, right now it will ping both my localhost webhooks (when I have stripe cli activated) but also my staging webhooks
and thats very confusing, i would like to test everything in localhost first, then deploy to staging and test the webhooks set up on stripe in test mode
so i would like to isolate these two cases
and then there is production, where I only deploy to once staging seems fine.
is this possible with stripe, to separate dev enviroment / staging / production?
Unfortunately we don't have such a classification. You can consider temporarily pause/disable the staging endpoint (which is registered on your Test mode)
np and good luck!