#thefrisson-treasury-access
1 messages · Page 1 of 1 (latest)
What do you mean by financial account?
Which endpoint are you attempting to use and what errors are you getting?
$ curl https://api.stripe.com/v1/treasury/financial_accounts -u youre right: -d "supported_currencies[]"=usd
{
"error": {
"message": "Unrecognized request URL (POST: /v1/treasury/financial_accounts). Please see https://stripe.com/docs or we can help at https://support.stripe.com/. (Hint: Have you onboarded to Treasury? You can learn more about the steps needed at https://stripe.com/docs/treasury/access)",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_RXeAflYbU6LmO4?t=1689972834",
"type": "invalid_request_error"
}
}
(base) Johns-Air:~ jidiv$
Have you onboarded to treasury?
However I just got off the phone with a sales rep for full treasury access. And went through the onboarding yesterday for test mode.
@cloud jackal Please remove the secret key from your last message. That's sensitive data
Even test mode keys should be considered sensitive
@cloud jackal the next step is to talk to our support team for access really: https://support.stripe.com/contact
thefrisson-treasury-access
What I can tell you is you are using the wrong API key
the request you made is on Stripe's default Stripe account for our docs, you didn't make the request on your own account with your own API key
Depends if the call works. If it doesn't yes.
but if it does work you likely are all set for Test mode
Ok, but there are also a ton of the python library modules that don't show up in the highlighting in VS Code when I try to make a dynamic function even though they are included in the docs
You're likely using an old version of stripe-python and you need to make sure you upgrade to the most recent one
I don't really know much about types and VSCodes.
Really I would focus on running the code and making sure the call works. We don't really have good types for that library today
Visual studio code is one of the most widely used code editors out there, essentially what I'm saying is that if it doesn't turn the color of a function or a class inside the editor when you type it out, then it doesn't exist in the hierarchy of the library as it is typed. I copied function calls directly from the api documentation, and they could not be found
that means you have the wrong stripe-python version installed really
I think the first step is to debug that
Okay so next step is to try and make a call with Treasury and show me the exact Python error you get (ignoring VS Code entirely)
Where you able to make such a request?
So it looks like the function call is recognized at least. The treasury module shows up as a plain variable (which makes no sense to me but moving on lol) I have a few errors to note. I know it says that you cannot create financial accounts using the api, but then it gives instructions on how to curl this request in conjunction with creating a stripe account. the only problem is, how do you pass the connected account to this call?
Please don't tell me I will have to run a subprocess for the cli
I'm not sure I get the question and those are just pictures
Oh sorry this script creates a stripe account and then attempts to pass the account id to the second call which creates a financial account, and then finally print out a list of financial accounts that are connected to my main account, but it doesn't get through creating the financial account. Tried it three times. Will circle the responses for you
why are you passing the account id? Which exact doc are you reading?
Also I don't think Treasury works with Express accounts
Ok will update code. But I am trying to pass the account id because the first error message says "If you are trying to create a Financial Account for a Connected Account, please include the Stripe-Account header."
Hoping thats for curl and not the cli
yeah I think you're going way too fast here and not really following docs
Connect is a really complex product and there's a lot of concept you might be missing. You're supposed to use the Stripe-Account header which is documented at https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header for example
I am following the response that i got?
I am aware that stripe connect is a complex product
Sure but it'd be easier if you read the docs end to end instead right?
Like https://stripe.com/docs/treasury/examples/financial-accounts for example
it has exact example code with the FinancialAccount creation and how to pass the right header
Specifically this one https://stripe.com/docs/treasury/examples/financial-accounts#creating-a-financialaccount