#thefrisson-treasury-access

1 messages · Page 1 of 1 (latest)

sturdy shuttleBOT
icy violet
#

What do you mean by financial account?

#

Which endpoint are you attempting to use and what errors are you getting?

cloud jackal
#

$ 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$

icy violet
#

Have you onboarded to treasury?

sturdy shuttleBOT
cloud jackal
#

However I just got off the phone with a sales rep for full treasury access. And went through the onboarding yesterday for test mode.

icy violet
#

@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
#

Thanks

#

Did that

cobalt ice
#

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

cloud jackal
#

Ah

#

Do i still need to talk to support?

cobalt ice
#

Depends if the call works. If it doesn't yes.

#

but if it does work you likely are all set for Test mode

cloud jackal
#

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

cobalt ice
#

You're likely using an old version of stripe-python and you need to make sure you upgrade to the most recent one

cloud jackal
#

I did, using 5.5.0 now

#

and was using 5.2.0 before

cobalt ice
#

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

cloud jackal
#

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

cobalt ice
#

that means you have the wrong stripe-python version installed really

#

I think the first step is to debug that

cloud jackal
cobalt ice
#

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)

cobalt ice
#

Where you able to make such a request?

cloud jackal
#

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

cobalt ice
#

I'm not sure I get the question and those are just pictures

cloud jackal
#

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

cobalt ice
#

why are you passing the account id? Which exact doc are you reading?

#

Also I don't think Treasury works with Express accounts

cloud jackal
#

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

cobalt ice
#

yeah I think you're going way too fast here and not really following docs

cloud jackal
#

I am following the response that i got?

#

I am aware that stripe connect is a complex product

cobalt ice
#

Sure but it'd be easier if you read the docs end to end instead right?

#

it has exact example code with the FinancialAccount creation and how to pass the right header

sturdy shuttleBOT
cloud jackal
#

Oh lol i see

#

Thanks, got here by trying to simplify each crud function into a simple function call and using ai stuff lol

#

So I have 2500 lines of definitions. Probs will be 4000 when i'm finished