#gabgab-TestMode
1 messages · Page 1 of 1 (latest)
Turning the button off only means you are on Live data, you can turn it back any time you want
You shouldn't need to have 2 account, unless you are doing something extremely special. You can easily switch between Test mode and Live mode
Sorry it is still not clear 🙂 I don't get how I can continue developping while my account will have Live data on.
Ah ok during the time I put the test mode, my api key for live mode continue to work ?
yes sure. Turning the option only affect the data you see on Dashboard
Under the hood, both Test mode and Live mode are running
Ok I think I get it, thanks for the clarification
@wheat marlin I still have a wonder. With 3 envs: local development, deployed pre-production and production.
For the production env: I just use the live_key
For the development and pre-production I'm not so sure. Currently I use the test_key for both of them. How can I know from the webhook events if the issuer is from the same env where the webhook is actually running.
So that on pre-production, events received that are created from the development env are just skipped.
About "intent" events, I can had metadata to identify the env that has created it.
But for instance for the 'application_fee' event I don't get how I can identify it as it is automatically sent by Stripe.
How can I know from the webhook events if the issuer is from the same env where the webhook is actually running.
I'd suggest adding metadata to your objects that you can then look for. https://stripe.com/docs/api/metadata Or you could use an entirely different Stripe account for the pre-prod environment.
But for instance for the 'application_fee' event I don't get how I can identify it as it is automatically sent by Stripe.
when handling the event, make a request to look at the underlying payment(https://stripe.com/docs/api/application_fees/object#application_fee_object-charge) and look for your metadata on that.