#gavinwahl_api

1 messages ยท Page 1 of 1 (latest)

vast pollenBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

mighty spruce
#

Hi ๐Ÿ‘‹

Service is the more modern approach. It is inteded to make it easier to configure your requests and Stripe clients. That being said, the Resources approach works just fine and is still what the majority of Stripe integrations in Python use.

frigid island
#

thanks

mighty spruce
#

No I think you are misinterpreting the services doc.

#

That is how you define a separate client for the Service approach

#

But then in these examples, they are showing how you can customize individual requests

#

So, you can still use a different API key even if you initialize the client with one

#

It's a difference between doing all your configuration on the StripeClient() init

#

vs

#

per each request

frigid island
#

where is the documentation for creating a customer with Service?

mighty spruce
#

Not all our docs contain both examples

vast pollenBOT
frigid island
#

I don't need code examples, just documentation. I literally can't find anywhere that tells me how to create a Customer with the Service approach

near rain
#

๐Ÿ‘‹ catching up here

frigid island
#

the python sdk has no docs whatsoever, and the docs.stripe.com docs don't document Service...how am I supposed to use the "modern" approach?

near rain
frigid island
near rain
#

Yes Service is the new approach and we haven't/didn't update all our Reference Doc for it. Sorry for the inconvenience. I think you can create a Session like

session = client.checkout.session.create(...)
#

Could you try it?

frigid island
#

no I can't, I'm not going to call undocumented methods.

#

this "modern" approach doesn't seem fully baked

#

I'm not going to do trial and error to figure out how to do things that should be documented

#

Thanks for the information. Maybe document that Service is beta-quality so people don't waste their time trying to use it