#riprock_code

1 messages ยท Page 1 of 1 (latest)

proper jasperBOT
#

๐Ÿ‘‹ 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.

velvet wolf
#

Hi there

#

Looking into this

verbal kernel
#

Thank you

proper jasperBOT
marble coyote
#

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

verbal kernel
#

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

marble coyote
#

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)```
verbal kernel
#
        self,
        params: "CustomerService.CreateParams" = {},
        options: RequestOptions = {},
    ) -> Customer:```
Params defined right there
#

RTMF

marble coyote
#

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 ๐Ÿ™ƒ

verbal kernel
#

Im sorry for the dumb question

marble coyote
#

there are no dumb questions

#

we're always happy to help ๐Ÿ™‚

verbal kernel
#

But also love that you guys have this discord!

marble coyote
#

this is new info to me too so thank you for helping me keep up to date ๐Ÿ˜›

verbal kernel
#

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!

marble coyote
#

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

verbal kernel
#

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

#

It uses the old method

marble coyote
# verbal kernel

can you share which page that is? i can suggest we add an example for the create method

marble coyote
#

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

verbal kernel
#

https://docs.stripe.com/api for the python lib needs updating too

marble coyote
#

i looked everywhere but there

verbal kernel
#

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.

marble coyote
#

yep yep

#

thank you for helping me track these down ๐Ÿ™ i'll chat with the teams who own the docs

verbal kernel
#

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

GitHub

Python library for the Stripe API. . Contribute to stripe/stripe-python development by creating an account on GitHub.

marble coyote
#

yep yep, one is owned by the team that builds the SDKs and the other is our docs team

verbal kernel
#

Ahhh gotcha! I hope you have a great rest of your day!