Note
Getting API Keys for Stripe Connected Accounts
Feb 23, 2021
I am playing with the Stripe API and creating “connected accounts” which is
Stripe lingo for a sub-account of sorts.
I noticed that the Stripe API from 2018-05-21 returns the test or live API
keys after calling `stripe.Account.create()`...
I am playing with the Stripe API and creating “connected accounts” which is
Stripe lingo for a sub-account of sorts.
I noticed that the Stripe API from 2018-05-21 returns the test or live API
keys after calling `stripe.Account.create()` depending on whether you used
test or live keys when calling the method. If you set a live key on
stripe.api_key you get live keys returned when calling
`stripe.Account.create()`, etc.
But the “keys” key on the returned JSON does not exist in the 2020-08-27
version of the API (perhaps earlier versions too).
It appears that you should use the _platform’s_ keys for newly created
connected accounts. And you should use your publishable keys, when necessary,
for "connected accounts" created under the platform.