#comegetsome_error

1 messages · Page 1 of 1 (latest)

fierce parcelBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1394800005679808565

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

upbeat silo
finite inlet
#

In my Stripe App, I am using the following approach to get the Stripe object.

import Stripe from 'stripe';
import { createHttpClient, STRIPE_API_KEY } from '@stripe/ui-extension-sdk/http_client';

const stripeClient = new Stripe(STRIPE_API_KEY, {
httpClient: createHttpClient(),
apiVersion: '2025-06-30.basil',
});

console.log("Calling accounts.list with params:", params);
const resp = await stripeClient.accounts.list(params);
console.log("accounts.list response:", resp);

upbeat silo
#

What is your params?

#

This error usually means that your platfom is listing the connected accounts of your connected accounts, which is not allowed

finite inlet
#

That's what I understood too but I am not in connected account context

#

if I click on View as 'connected account name' user, then i get that error in Shell too

upbeat silo
#

Could you share your platform ID (acct_123), so that I can look for the requests with this error?

finite inlet
#

sure. Its
acct_1EG7TwBENesAQTLZ (platform acc)
acct_1RhIfYJQoEUExGwO (connected acc)

#

Shall I send you the API request headers

finite inlet
upbeat silo
#

Which account's API key do you use?

#

Is it platform's?

finite inlet
#

Another friend told me to use
const stripe = await stripeApp.getStripe();
but I think that for backend use. I am in UI extensions SDK.

#

acounts/list

#

yes. its for platform use

#

but that error comes if you call it from connected account context

#

so something is making my platform context look like connected account context.

#

i can share the app with you if you want to try it

fierce parcelBOT
upbeat silo
#

Looking into it now

finite inlet
#

yeah but that's not my app. That's when i switch to connected account user and tried 'stripe accounts list' on shell, which generated this

#

i dont see my errors getting in Log

upbeat silo
#

Why are you attempt to view the connected accounts on your connected account using View as 'connected account name'?

#

Did you add stripeAccount header somewhere in your code?

finite inlet
#

just while troubleshooting

#

the SDK is calling this API internally

upbeat silo
#

This error is expected because you're viewing connected account's connected account using platform access

#

Could you share what you're trying to do here?

#

Why are you listing the accounts?

finite inlet
#

Is this chat private?

upbeat silo
#

This chat is public

finite inlet
#

Yeah we are building a Stripe App which will pull connected accounts of the platform and do something with it

#

The user of the App is platform operators/admins

#

not end merchants / connected accounts

#

I think if I send you the app you can see exactly whats going on

crisp wasp
#

Hello, my colleague has to step away so i'll be stepping in to assist. Just trying to get caught up.

finite inlet
#

Thanks River!

#

Hi Mossy

crisp wasp
#

Sorry, just trying to read through everything.

finite inlet
#

Its late for me Mossy. I'll be available tomorrow and will ping you.
It seems to me that there is a bug in Stripe's UI Extension SDK which isn't detecting the right context for the Stripe APIs. There may be some clues in the API headers that are determining wrongly that this is a connected account.

crisp wasp
#

Sounds good, were always here on weekdays 🙂 I'll poke around and ask some of my team who have the most familiarity with the UI Extension SDK.