#gecko_postman-questions
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1258163373473009736
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Do you have access to the Dashboard?
I do not currently. Owner is in a meeting. I've been doing the development on my dashboard and he just gave me the Live key.
I wanted to be sure it wasn't an issue on my end before we go digging. ๐
You can't make test mode requests with a live mode key, so no worries there
I haven't actually created any test transactions in his account, so if that's needed, I can get his test key.
You'll need a test mode key to make test mode requests
That transaction used his Live key, but it returned livemode - false
awww, crap. It did NOT.
I'm a dork.
Sounds like you found the cause. Yeah, it's a test mode key
That was the one spot that still had the key hardcoded, despite having the variable outside. Sorry about that!
Thank you for verifying! Have a great day!
Likewise!
Hey, sorry. I'm getting ""You may only specify one of these parameters: default_price_data, type.","param":"default_price_data"" when I try it with the Production key. req_PQanFQYciRWnrO
I am only specifying the default price, AFAIK.
Do I need to create a Product prior to creating an offline Checkout session? We're trying to bill for Shipping and Logistics Deposits for a convention.
I thought I needed to create the Product first (hence me trying this again), but I'm not sure now.
What do you mean by "offline checkout session"? There's no such thing as an offline checkout session
Well, we're creating a Checkout Link.
That we'll email to the leads at the conference.
Can you be more specific? What is a Checkout Link? There are Checkout Sessions and there are Payment Links. Which one are you referring to?
A Checkout Session customized to each Lead for an area at DEF CON. We'll email them the URL for it.
Got it. This seems like a bad error message. Let me dig a bit and circle back
That makes sense. It works with the test key, but the exact same data does not work with Live.
Live Mode - Bad - req_bnGh4nrF867wdd
Test Mode - Good - req_LPw3B0mjY54cjf
Gonna grab a colleague to look with me real quick. Will brb
Looks like your API version is 2016-03-07, which is ancient.
On API versions older than 2018-02-05, type is set to good by default
in the API changelog: https://docs.stripe.com/upgrades#2018-02-05
Gotta update your API version
The default API version is set in the Stripe Dashboard: https://dashboard.stripe.com/developers
gecko_postman-questions
Where is that setting? I literally created my dev account and keys on June 14.
sure so what's the problem?
I don't know. two-shoes said I was using the API from 2016. I literally forked the official Postman collection about two weeks ago.
All of my keys were created on June 14, 2024.
The same request to create a new product fails when I use my friend's Live key but works when I use my Test key.
Since we're just billing a deposit, if I don't need to create a Product to send a Checkout, it doesn't matter. If that's true, then just LMK and I'll skip it for now. (I tried several different approaches until they figured out what they wanted to do.)
the Live mode and Test mode requests were made on completely different Stripe accounts
The one that fails was in Live mode on an account that is many years old
Right. Is Emo on the old version, then?
yes
Really, Postman is here just for you to learn, nothing else.
You shouldn't use Postman in Live mode and if you write real code using one of our official server-side SDKs, those "pin" the API version explicitly which guarantees that the code works the same on different Stripe accounts
Does that make sense?
OK. He didn't tell me that he'd ever messed with the Dev options since he rarely uses Stripe.
Yeah, that's all I do with it. Once the calls work, I move the cURL into FileMaker.
I mean he didn't mess with anything, he has a multi-years old account and has a default API version that is really old from when they likely opened their Stripe account
When you do curl, you can force the API version: https://docs.stripe.com/api/versioning which will solve your issue
otherwise you're going to get a lot of issues, the API changed a lot over the past 8 years!
That makes sense.
So, I can just have him login to his account and upgrade, though, right?
Otherwise, I can go through all the scripts and add that.
Awww, crap.
I did create our webhooks in Postman (since that's just a config thing). Guess I'd better kill them, then and add the version header.
You can have them upgrade but if they use anything else on their account (any other code, plugin, whatever) it could break their entire integration. So it's unlikely you want that.
So yeah I'd recommend fixing your own code/implementation and not having them press that button
hahaha ๐
Thanks, y'all! I appreciate the help!
Emo's just going to have to give me access to the account so I can prevent this in the future. ๐