#subin_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/1346721512081588298
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- subin_error, 15 hours ago, 32 messages
- subin_error, 1 day ago, 56 messages
- subin_error, 1 day ago, 28 messages
- subin_error, 4 days ago, 51 messages
what are the additional data you need?
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
i dont have the request id.
the api key is invalid so no entry in the stripe dashboard
i explain the whole scenario in earlier tread.
do you have access to it?
last coummunication on that to verify the intergration.
support agent provided an article.
What kind of request is it? Can you share with me the complete stack trace?
payment request
iam using the Oauth to refreshing access tokens.
here iam using stripe checkout for payment.
iam using wordpress plugin for payment and stripe app for OAuth.
account id : acct_1Pza6dGv07M9Hyxh
2025-03-04T08:01:31+00:00 is the time i got a access token i used it on request at 2025-03-04T08:32:43+00:00 and it return error , invalid api key.
then i sent request to refresh access token on 2025-03-04T08:36:05+00:00
and after that it worked.
also i checked and account not disconnected or uninstalled.
i want now how a valid api key worked in earlier payments get invalid api key.
if i sent request to return new access token via refresh token it working.
i checked that the accesss token passed is not expired
Did you create the request in live mode or test mode?
And are the above timestamps in UTC?
Ok, let me take a look
I think we discussed about it. Before you made the request to create a checkout session, had you tried using the same access token to make a GET response to very if the access token was still valid?
Kindly note that acess token is only vaid for one hour https://docs.stripe.com/stripe-apps/api-authentication/oauth#refresh-access-token
https://dashboard.stripe.com/test/logs/req_1cqNcEWPXVEUoQ I found that your application made a successful request at 2025-03-04 07:30:04 UTC
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I also noticed you made a request to refresh token at 2025-03-04T07:07:58 UTC, which would expire the previous token. Can you check your code and make sure it always uses the latest access token?
sorry time zone is in utc.
i got mistaken earlier
and also i log while refrshing refrsh token and log the keys form debuging purposes.
also i log the error on failed payments.
on looking at those log the failed payment happense in between refrshing the access token.
i will add the part used to verify the access token in the code.
but it will increase the time taken for the payment.
Also i have a doubt if i got a access token its have a expire upto 60minutes if there is no refrashing is done and the up is not deautorized.
is it correct?
is there is any reason which may make a access token invalid?
Yes you are right, the access token will stay valid within 60 mins as long as you don't refresh a new access token
is there any other chances the access token get invalid?
i dont find whats go wrong?
I found that your code made many v1/oatuh requests, so there's a possibility that your code refresh a new token but still use the old token when creating a request.
no, the token passed is the one is valid
in the sense it is get from the last refrshing access token.
every refreshing the access token where loged so i dont find any other refrsh toekns.
if the any new refrshing done the refresh token will change.
but in this case i make a new access token with the refresh token get along with the invalid access token.
Again, how are you refreshing the token exactly?
i am using Oauth.
iam using the refrsh token to do so.
i am snting the refresh token to stripe app server.
from there
$data = array(
'refresh_token' => sanitize_text_field($refresh_token),
'grant_type' => 'refresh_token',
);
// Arguments for wp_remote_post()
$args = array(
'body' => $data,
'headers' => array(
'Authorization' => 'Basic ' . base64_encode($stripe_secret_key . ':'),
'Idempotency-Key' => sanitize_text_field($refresh_token),
),
'method' => 'POST',
'timeout' => 45,
);
$response = wp_remote_post($url, $args);
the response is returned to the wordpress site. and stored there
What's the URL?