#ozzy_api
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/1316817756703821969
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there
Can you share more details about what you mean when you say "change it to live"? Did you update both your secret key and publishable key?
Please don't share any secret keys here.
I only changed my secret key and rolled my publishable key
i am getting a null resource id or whitespaced this just happened last night all i did no changes to my code
rolled my publishable key
Did you update your client-side code to use thepk_livekey?
Yes
i am seeing this error on payment processing. what is a quick way to get back online: "Your account cannot currently make live charges.",
"request_log_url": "https://dashboard.stripe.com/logs/req_evJrfxJfYeW3uf?t=1734020532",
"type": "invalid_request_error"
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
@silver meadow looks like you're in the wrong place, this thread is for someone else's question.
- If you have your own thread please chat there.
- If you have a question or a followup to a closed thread use one of the buttons in https://discord.com/channels/841573134531821608/842637025524842496 to get help (we don't reopen closed threads).
Note that posting inappropriate messages in other people's threads is against the rules. No worries if this was just an honest mistake, but anyone who violates the rules multiple times will be removed from this server.
ok thx
@iron plover I think you'll need to debug this more closely
I recommend adding some logging to determine where the code is errorring out after you swap in the live keys
Can you share the section of your code that calls /v1/invoices?
Are you retrieving an Invoice that only exists in test mode?
it doesnt make sense I tried keys from a different stripe account and it works
something wrong with the stripe keys
Are you able to test that secret key outside of your code? You can try using cURL
I will try that i will need some time
by "original keys" you mean your live secret key?
Okay, that's not too helpful.
I was hoping you could make a call to list all customers using the same key you're trying to use within your code to rule out any issues with the key
You could do something like this: https://docs.stripe.com/api/customers/list
and use cURL
Ok I will open another ticket i will need some time for this
I am getting a new error now
Invalid card details No such token: 'tok_1QVH8NBwNF8aAhcXs9bzIfQ1'
What are you trying to do when you get that error?
pay with my cc
Specifically, what kind of request are you making when you get the "No such token" error?
I suspect you're mixing up accounts
trying to do a $10 donation on the checkout i changed all the keys to the correct ones
trying to see my error log
Can you see this log? https://dashboard.stripe.com/test/logs/req_Y1NPcFBtJ5nSEM
Okay, I think you need to take a step back
This is getting confusing to follow and I think you might be trying to do too many things at once
Start from the top and confirm that your code can still run with the test mode secret key and test mode publishable key.
It works on test mode
Can you share the test mode publishable key you're using? It's safe to share here since publishable keys are public/not sensitive
The key begins with 'pk_test'
pk_test_51KrzE2BwNF8aAhcXNMoFjTtRn2nyHynf61jKNUDmzmSQYNXQAQGPLFol3iNsKmB5VTnrZL1wvxQoXzhAqO5ygqGs00wJghjunP
Okay, good. That key is tied to the same account you used to create token tok_1QVH8NBwNF8aAhcXs9bzIfQ1
Do you happen to have the request ID for the request that returned the error nvalid card details No such token: 'tok_1QVH8NBwNF8aAhcXs9bzIfQ1' ?
Sorry I do not. I got the error resource id cannot be nulled or whitespace again won't let me access my code
If you don't see the request ID in your logs - that means the API request is going to a different account.
How are you initializing Stripe.js?
This stopped working suddenly last night. I can't process donations anymore unless I do a test donation, which works fine. However, when I switch to live keys, the site crashes and shows the error: 'source ID cannot be null or white.' I haven’t changed or rolled back my API versions. Strangely, if I use the same code with keys from a different account, it works fine.
What line of code is throwing "'source ID cannot be null or white" error?
[12-Dec-2024 11:47:13 America/Boise] PHP Fatal error: Uncaught Stripe\Exception\InvalidArgumentException: The resource ID cannot be null or whitespace. in /home2/ozzycode/public_html/h4cdev/donate/includes/stripe-php/lib/Service/AbstractService.php:99
That's just a log. What line of code in your integration triggers the error? There must be something in your own code that's calling methods from stripe-php right?
Yeah one sec
foreach($i as $key=>$value){$invoice_data=$stripe->invoices->retrieve($value['latest_invoice'],[]);
So what are you iterating on here? I'd recommend backtracking it line by line
Ok. I am going to review this again and get back to you guys if i need support again need a little break
NP! 🙂 Good luck
I suspect you're using Stripe Connect based integration and you're initializing Stripe library with a connected account ID. When you switch platforms, the same connected account will not be connected to the other platform.
Which is why you're seeing resource not found error.