#fygasdfgsadf-versions
1 messages · Page 1 of 1 (latest)
@west pike hi! in general setting sripe.api_version that way in your (Python?) code should work.
But the session object I get on the success page
how do you get it exactly? if you're callingstripe.checkout.Session.retrieveon a script from that page remember you need to passapi_versionthere as well(for the retrieve call)
the object itself can be retrieved using any API version, it gets returned rendered in that version, it doesn't have any specific locked version based on how it was created
I am receiving it via stripe.checkout.Session.retrieve , and I am setting the stripe.api_version before doing the retrieve call. Yes, I am using python.
can you share the ID of the exact session? cs_test_xxxx I think
also are we definitely talking about(the snippet of JSON you shared above) looking at the response you get from stripe.checkout.Session.retrieve or we are talking about the contents of a webhook request body? Since webhooks work quite differently here :p
cs_test_a1BQZ5BuqJ55R4k0U5qlLTbkA9wis0ZUCXPBeMQ28vKqXE8N6CPdluJYNG
Bit you are right, it could also be from a webhook, sorry.
I have to rerun the test.
yep from what I can see you are passing the header correctly
for webhooks though, the event is sent using the default API version of your account(it's not related to the version you make the request in)
what you likely want to do for testing is create the endpoint using the latest version instead, so then we send it events rendered in that version :
or if you use stripe-cli, it has a --stripe-version option to stripe listen
Ok, I will try the --stripe-version option.
This option is miising in the docs under https://stripe.com/docs/cli/listen
Complete reference documentation for the Stripe CLI.
I tried --version and --api-version ...
ah I'm wrong actually, it's just --latest
unknown flag: --stripe-version
yeah you want --latest, my bad
Ok, it works now.
Thank you
btw. When did Stripe became so confusing?
7 years ago it was a walk in the park. Now it is like Paypals API.
Or I am getting old.
thanks for the feedback! The API does support more use cases and payment methods than it did, and there's also factors like increasing use of customer authentication like 3D Secure in the industry, all of which adds complexity to the API, but this is definitely something we think about and discuss a lot internally so I appreciate the feedback.