#oconnor0 - test account

1 messages · Page 1 of 1 (latest)

karmic junco
#

Is this for Connect accounts?

strong sand
#

Yes.

karmic junco
#

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

strong sand
#

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?

tacit forum
#

Hello! I'm taking over and catching up...

strong sand
#

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.

tacit forum
#

Stripe CLI is test mode by default.

strong sand
#

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

tacit forum
#

What live data can you see with test keys?

#

That second request was made in live mode.

strong sand
#

acct_1Ke3RzPGX7F5M2Pj is a live account, right?

tacit forum
#

Stripe accounts are not really live or test, they have both live and test modes, including that one.

strong sand
#

Ah.

tacit forum
#

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.

strong sand
#

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?

tacit forum
#

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.

strong sand
#

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.

tacit forum
#

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.

strong sand
#

Yeah, I can probably just track that information at account creation time too.