#sergiu_api
1 messages ยท Page 1 of 1 (latest)
๐ 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/1486303374956826786
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Also the documentation is wrong for that endpoint.. The example uses x-www-form-urlencoded to filter account type but i get error asking me to use json only.
Which documentation?
Looking at the request
Looks like the Stripe-Context header is not actually passed in the request. Are you sure it's set? If it's nullish I believe it'll be silently dropped
If I copy paste this request in postman and add my org key I get illegal content error
curl -G https://api.stripe.com/v2/core/accounts
-H "Authorization: Bearer sk_test_51TCf0cE4yx9BNG3lWPydPM00jVsHiE666Q3Qu2zD4abstFZyBaAuJlikAy6upM5BS9TDnXkwPhZPpwQaIEMsH4WF008I6PIuk5"
-H "Stripe-Version: 2026-02-25.preview"
-d limit=2
-d "applied_configurations[0]=customer"
That's what I'm not understanding... I need to fetch accounts of all the organisation, In docs it does not require stripe-context. Stripe-Context will be needed to fetch transactions for each account, if i understood corectly
Yes, because you're using a form encoded body. It needs to be JSON
That's what I'm not understanding... I need to fetch accounts of all the organisation, In docs it does not require stripe-context. Stripe-Context will be needed to fetch transactions for each account, if i understood corectly
No, they don't work like that. The Stripe-Context header is required, you can't use the org key to list all resources for all sub accounts:
You must specify the relevant account using the context and the API version in any API request using an organisation key.
Ok, so is there any way to acomplish what i need? We have existing flow for normal per account api key. Jobs are produced via cronjob with credentials passed to fetch transactions. This client have org key because he dont want to create a integration per connected merchant account (hundreds of merchants).
In order to acomplish that, we need to dynamically fetch all merchant accounts in org... So we can dynamically fetch transactions. Because the list of accounts are changing pretty often, it's a food delivery app so new restaurants means new merchant account...
Should this be done using the platform account id?
Organization (org_6SD3oI0eSQemPzdmaGLJ5j6)
โโโ Platform account (acct_1R3fqDP6919yCiFv)
| โโโ Connected account (acct_1032D82eZvKYlo2C)
โโโ Standalone account (acct_1aTnTtAAB0hHJ26p)
If the merchants are all connected via a platform account, knowing the platform account ID would give me all connected merchants to the platform account?
I don't really think there's an alternative other than paging through the acct_xxx IDs you have and making a request for each, setting them in the Stripe-Context header
Well, is it a Connect setup? Fundamentally that's a big difference but yes that would work: https://docs.stripe.com/get-started/account/orgs/setup#multiple-accounts-connect
Yes, I understand that in order to get transactions i need to pass account-id in stripe context.
What I am trying to understand if there is a way to not have a hardcoded list of accounts id, but rather have a few (platform accounts) that never changes, and to use the accounts list endpoint with the id of platform account to fetch all merchants.
I am 95% positive it's a connect setup
I can't say the name but its a global food delivery app
Ok now its a bit clearer. I want to ask you if it's enough to have Accounts read permission and to pass platform account id to Stripe-Context in order to fetch all merchants connected to that platform
He selected under Connect > Accounts > Read
Is this actually a Connect setup though?
Still not sure if it'll work though to be honest
I asked right now if it's a connect setup or it's multiple standalone accounts under one org. Is that the correct question for them?
Well if it does not work would be pretty rough. Both us and them would need to mantain a list of account ids daily ๐
Well that's how it'd work in a Connect context depending on the type of payments you're processing
I'm assuming these are direct charges that you need to get from the accounts?
Yes we automate generating chargeback reports, that pdf proof you need to submit in case of a dispute
But if you're doing direct charges, why does the platform need to handle disputes? Generally they, as the MoR, would handle those directly: https://docs.stripe.com/connect/disputes#direct-charges
Overall, I think you need to get a better understanding of the setup (whether it's Connect, what type of Connect, etc) and then we can help further
But generally I don't think what you want to do is possible โ you can't get all data from all sub accounts without providing the Stripe-Context header
Yes I understand now. If they are ussing connect setupt, we can only store the platform account ids, then to fetch all connected accounts providing Stripe-Context header with value of the platform account on accounts list endpoint.
Then I need to make a call for each account from the result of account list and set stripe context to fetch transactions
This should be doable, right?
Is it ok to come back here once I get all the info?
hey there ๐ taking over as Ynnoj needs to step away
yes, if you're providing the Stripe-Context header with the platform account ID, then you can list all connected accounts for that platform