#yaikia_error
1 messages ยท Page 1 of 1 (latest)
๐ 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/1390045420893372626
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ is that an error you're getting from our API, and if so can you share the request ID for the request you made to our API, or is that an error that your API is returning to you?
Oh I see, your API is throwing an error and returning our API error in it.
And that request won't have a request ID, because if you provide an invalid API key the request doesn't get far enough into our stack to generate an ID.
Yep
You'll want to double check that the secret API key that you're using is correct and matches the secret key for the account you're intending to test with.
Probably the right one, but I suggest rolling that secret key as this is a public forum that it's been shared in.
Yep, i did log in through my console with stripe website
So its good for 100 percent
And then i'm using the copy button
So i dont fckin understand
Can you make a basic curl request using the key? (To help take your code and tech stack out of the equation and check just the key itself)
Creating a Customer is probably the easiest endpoint to test with, since you don't have to provide any data in the request
Yes one sec
Also, I don't think the keys you showed in your screenshot line up with the Account where the Price ID you shared (price_1RgUhKFZHu2biJbUHQCaE8YZ) resides. But that should lead to a different error if the API key you use is valid, so we can focus on the API key first and then see where that leads us.
Mk, doesn't look like a problem with the key itself then. So maybe how it's getting pasted or read in your code.
I'd suggest checking for leading/trailing white-space or quotes, or possibly invisible leading/trailing characters.
Thats what i'm doing since one hour
I only use the button to copy paste
The lenght should be 107 right ?
Ctrl V bro
Into an environment variable, a constant file, a local variable, just as a string?
How are you using that variable? Are you using it with one of our libraries?
I don't understand what you're trying to show me here.
Have you logged out the contents of the variable holding that key during runtime, to make sure it's what you're expecting it to be when your endpoint is called?
Wdym
You're storing your secret in STRIPE_SECRET_KEY, have you added any logging to output the contents of that, so you can triple check it's what you expect it to be?
Seems right. I'm not familiar enough with your code to keep guessing about possible problems here. We've confirmed that your key works when using it directly via cURL, so the problem seems to be with how you're using it in your code, but there isn't much context in this thread on how you're doing that so I don't have much information to go off of.
What else could cause Stripe to reject the key only when called inside my endpoint, even though it works perfectly via cURL?
Nothing that I can think of.
Iโm fucked ๐