#riprock_code
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/1375210888893693963
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Thank you
hello! fyi i'm taking over for vegvisir. i am not super familiar with StripeClient so i might need to run a quick test myself or possibly check with some colleagues - give me a bit to experiment with that
Hello there! All good. I have been digging into the codebase myself too trying to see where the flow could be breaking and the error getting raised
ok, i got to the same point as you and i am also running into the same error.... let me dig a little bit more
ok i got it, you have to used a new params param. here's my example code that worked
STRIPE_SECRET_KEY,
stripe_version="2025-04-30.basil",
max_network_retries=3,
)
def create_customer():
customer = client.customers.create(
params={
"name": "Test Customer",
"email": "email@stripe.com",
}
)
print(customer.id)```
this is documented in the migration guide at least....
https://github.com/stripe/stripe-python/wiki/Migration-guide-for-v8-(StripeClient)
see step 4 - after

self,
params: "CustomerService.CreateParams" = {},
options: RequestOptions = {},
) -> Customer:```
Params defined right there
RTMF
happens to the best of us. yesterday i spent 30 minutes troubleshooting an API and it turned out i was passing id instead of price for one of the path parameters ๐
Im sorry for the dumb question
this is new info to me too so thank you for helping me keep up to date ๐
Like its part of the reason I keep using stripe
Being able to write code and interact with staff directly instead of having to fight phone trees and wait for support engineers to triage and route is definately a big plus to dev expirence
Again Thank you!
yep of course! feel free to come back any time!
i also don't love that it's difficult to find examples of how to use the new pattern so i might see what i can do about improving our docs on this
The example shows how to interact with just a link to the migration guide that explains how to use the new client instead of having the examples.
In my mind when I was reading. Im like this is a new project so Im not migrating from anything so I just want raw usage, no translations from old client
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It uses the old method
can you share which page that is? i can suggest we add an example for the create method
and yeah i was going to suggest we also add an example for every single API call, but that's a larger lift. but it needs to happen eventually
https://docs.stripe.com/api for the python lib needs updating too
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It shows an example of the new method but in the docs it mentions setting stripe.api_key which is the old method as text.
yep yep
thank you for helping me track these down ๐ i'll chat with the teams who own the docs
Happy to help!
Yeah the two Doc locations(I assume 2 teams) have missmatching info
https://github.com/stripe/stripe-python/blob/7db7345c4c6b55bdfa37482ffc6dae0d4d362e59/README.md
and
https://docs.stripe.com/api
yep yep, one is owned by the team that builds the SDKs and the other is our docs team
Ahhh gotcha! I hope you have a great rest of your day!
