#oconnor0 - test account
1 messages · Page 1 of 1 (latest)
Yes.
Well if you are retrieving it with your test mode secret key, you can know it's a test account
It wouldn't come up if you used your live secret key
Huh, OK. When I use stripe login, I see that a pair of live and test keys are saved for use. How do I tell which key was used for a request?
Hello! I'm taking over and catching up...
Most responses from the Stripe API have a livemode property that's set to either true or false. Do you have the request ID of the request you're asking about? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Let me see. I realize I don't understand which key (live or test) that Stripe CLI uses by default so I was trying to see if I could figure that out.
Stripe CLI is test mode by default.
Hm, OK.
So one of the request IDs is: req_rtFeo0rs2QJC7R (for test)
It looks like I can view live data with test keys?
A similar request ID for live is: req_B1jvOZb1UAYE9h
What live data can you see with test keys?
That second request was made in live mode.
acct_1Ke3RzPGX7F5M2Pj is a live account, right?
Stripe accounts are not really live or test, they have both live and test modes, including that one.
Ah.
You can connect to a connected account in live mode or test mode. If you're connected in live mode you also get access to test mode on that connected account.
There are situations where, if you create an account in test mode, that account will be test mode only.
But by and large accounts have both modes beyond that.
Got it.
It does sound like there is a difference for whether a connected account was created in live mode or test mode as to where its events get send and whether or not it can be a test mode only account?
Based on this message: #999797632023138344 message
Yep, that's correct. As I mentioned above, when you connect to a connected account in live mode you get access to both live and test mode, including that account's events. If you create the account in test mode you only get a test mode connection and, thus, test events only.
At a high level what are you trying to do? I can probably give you guidance if I know what your goals are.
After realizing last week that I have spent time chasing live mode vs test mode issues on accounts or events, I am trying to add UI on my end to clarify the states of various the pieces: the keys being used (which is easy), the "status" of an account (test only or live+test), and the live mode of each event. The "status" of an account was the only one I didn't see obviously in the API.
The connection status isn't something we really expose in the API. The best way to tell would be to attempt to access something on the account in live mode and, if it fails, you know you don't have a live mode connection.
Yeah, I can probably just track that information at account creation time too.