#brettskibrettski-api-ref
1 messages · Page 1 of 1 (latest)
Hello! Starting up a thread for you
There is no way to force the docs to show a specific API version, but what specifically are you trying to do? If there's a specific parameter or request you have a question about I can definitely help with that
Well I have noticed that things have changed, e.g. around checkouts, and since we are unable to move to the new api at this time, I want to ensure I am configuring things correctly for the api I am programming against
Gotcha - a better resource to look at may be the API changelog (https://stripe.com/docs/upgrades#2022-08-01) - it talks about all the backwards incompatible changes that were made in each API version, so you can check what Checkout changes were made in the most recent version
That's not great, now I am looking at two references to make changes. Ugh
I guess there is no way, thanks for your time.
Alternatively, the API reference also has callouts about which parameters have changed compared to your api version
here's an example
I noticed, but they are not all up to date yet so I was worried about missing something
For example, there is no callout that that description has been removed from line items: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-line_items
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So now I have no reference to this field which is heavily utilized in our codebase
Yeah that's a downside of the API reference - it doesn't call out which fields are removed, it's mostly caling out which behavior has changed on fields that are still present
I also see you typing in the main channel - if you have other questions you can just ask them here
Oh, okay. I didn't know if you 1 question per thread was preferred
We are looking to pass in a discount code when creating a checkout. We noticed that discounts/promotion code, can be passed in (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-discounts-promotion_code), though it takes a promotion code ID.
Our customers all get the promotion code name. Is there a way to lookup a promotional code name and get the ID back? The only lookup method I am seeing is by id: https://stripe.com/docs/api/promotion_codes/retrieve
Backing up for a second, is your goal to allow customers to provide a promotional code (the name, not the ID) during the Checkout Session, or do you want to apply the promotion code during creation?
apply promotion during checkout creation
This way the customer doesn't need to type in a code, we handle it on the web app side
Gotcha
Then if you need to find the promotional code ID from the name/code you'll need to use the List API and provide code (see https://stripe.com/docs/api/promotion_codes/list#list_promotion_code-code)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
wow, really? :sigh:
Yeah, sorry this isn't easier - the promotion code is meant to be customer-facing and not used during creation (they'd input it while completing the session)