#Code-Mario

1 messages · Page 1 of 1 (latest)

marble mothBOT
fast furnace
#

Hi there

#

Are you using one of our client libraries to retrieve this account?

frail narwhal
#

I think so. I set up the StripeFetch as below.
export const stripeApi = new Stripe(STRIPE_API_KEY, { httpClient: createHttpClient(), apiVersion: '2020-08-27', });

#

Then I do:
await stripeApi.accounts.retrieve()

fast furnace
#

Hmm what version of our Node SDK are you using?

frail narwhal
#

9.8.0

fast furnace
#

Hmm that should be fine

#

What is the account ID that you are trying to retrieve?

frail narwhal
#

acct_1FqpMqAg7It2SgG9

#

Invariant Violation: stripeApiFetch does not support /v1/accounts/ at invariant

fast furnace
#

Are you trying to do this via Stripe Apps?

frail narwhal
#

Yea

fast furnace
#

Ah okay that's quite different then

#

Let me see what I can find on that

frail narwhal
#

Thanks

fast furnace
#

Wait that is the platform account that you are trying to retrieve though, right?

#

As opposed to one of its Connected Accounts

frail narwhal
#

The idea is to get the account of the current account using the app. So I am guessing that's the connected account?

fast furnace
#

And you have connected_account_read permission enabled?

frail narwhal
#

Yea

marble mothBOT
fast furnace
#

Yeah overall not sure this is possible. Let me check with a colleague

frail narwhal
#

Is there a way to get the default currency of a stripe account?

#

And more importantly, is the extensionContext for the connected accounts or the platform account?

violet delta
#

Hi there 👋 taking over, as my colleague needs to step away

Just to confirm my understanding, you want to know if you can retrieve the account that the Stripe App is actually installed on?

frail narwhal
#

Hello,
Yea, connected account

#

But can you just confirm if the extensionContext is different for each connected account or is it that of the platform account?

violet delta
#

When a Stripe App UI loads, one of the injected variables is the userContext which we call out here (https://stripe.com/docs/stripe-apps/build-ui#access-stripe-objects). This is an object defined as:
(parameter) userContext: { id: string; name?: string | undefined; account: { country: string; id: string; name?: string | undefined; }; locale: string; }
It gives the Stripe App access to the account ID, country, and name associated with the Account.

Build, test, and edit a custom UI that extends the functionality of the Stripe Dashboard.