#matrix - Direct Charges
1 messages · Page 1 of 1 (latest)
Hello! Can you give me the request ID with the error you're seeing? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
ok
I cant find any log. I have this output from my firebase dashboard (server):
Unhandled error StripePermissionError: The provided key 'sk_test_51*********************************************************************************************5i7g' does not have access to account '{{acct_1Jpu8gFbYZoKrptz}}' (or that account does not exist). Application access may have been revoked.
I can see from the dashboard that account is connected to my account
I am using test data
Can you give me a request ID from your platform account? The one associated with that secret key? Can be any request ID.
Yep, sorry, things are just busy. 🙂
Taking a look...
You're certain you're using the correct secret key for that request?
The one from your platform account?
i think so let me check again
yes the secret key is correct
I am using test key, not sure if it is has an impact
It shouldn't, no. Hang on...
ok
Can you use the same secret key to retrieve your own account and confirm it's the one you expect it is?
curl https://api.stripe.com/v1/account -u sk_test_123:
i dont have curl, do i need to install it?
You can make the request with whatever tool you have available to make HTTP requests.
like terminal?
Postman would also work fine, for example.
Terminal? Not sure what you mean. Like the Terminal app on a Mac or something else?
yes terminal on a mac
curl https://api.stripe.com/v1/account -u sk_test_123:
{
"error": {
"message": "Invalid API Key provided: sk_test_123",
"type": "invalid_request_error"
}
do i need to put my sk?
Yeah, replace that with the secret key you're using. And it's best to not paste the output of the command once you run it successfully, there may be details in the output you don't want public.
ok I have got a long log
There should be a display_name in there. Is it your platform account's name, the connected account's name, or something else?
it is my company name (the platform)
Okay, try this command to retrieve the connected account and see if it works:
curl https://api.stripe.com/v1/account -u sk_test_123: -H "Stripe-Account: acct_1Jpu8gFbYZoKrptz"
Invalid API Key provided. it is the same error i see in the firebase server
What was the display_name you got back from the previous command?
the legal name of my company
Is it one word or three words?
three words
M4xxx Dxx Lxxxxxx
i can see that account acct_1Jpu8gFbYZoKrptz in my stripe dashboard with a RESTRICTED status
could this be the problem?
could it be an issue related to how i connected that account?
Actually i see the name of that connected account to be the same as my company...
while some other old connected account does not have a name
and this connected account is a standard account with a "Platform controls enabled" label (while old ones do not have any labels)
Will you try this command and see if there's a request-id anywhere in the output?
curl -v https://api.stripe.com/v1/account -u sk_test_123: -H "Stripe-Account: acct_1Jpu8gFbYZoKrptz"
But with your secret key?
Can you paste the error message?
it is always the same
{
"error": {
"message": "Invalid API Key provided: sk_test_************************************************************************************************i7g3",
"type": "invalid_request_error"
}
}
But curl -v https://api.stripe.com/v1/account -u sk_test_123: does work with your key?
yes, there is a long list of things but no errors
I'm not seeing a reason for these errors. Asking someone else to take a look to make sure I'm not missing anything.
ok thank you so much.
I have tried to make a direct payment to my account and it was succesful. here is the request req_cAWwsiIbtFNPev
Ah, okay, so according to our logs the successful request you made to retrieve your own account used a secret key ending in 5i7g but the error above says the key you're using ends in i7g3. Did you use a different key?
Or did part of the key get cut off?
Or was the 3 at the end a typo?
oh sorry my fault. I have done a typo in the sk
I am now doing curl -v https://api.stripe.com/v1/account -u sk_test_123: -H "Stripe-Account: acct_1Jpu8gFbYZoKrptz"
Right, but replacing sk_test_123 with your platform's secret key, the one ending in 5i7g, correct?
yes
Looks like it worked!
so now there is no error
Okay, so your platform account can access that connected account as expected.
So going back to your original error, can you confirm the secret key and account ID being used there match the key and account ID used in the curl command exactly?
yes now the sk key are the same
Are you still seeing the error or does it work now?
Yay!
but I am not sure what was the problem at the end (a part from adding a 3 in the code you asked me to run)
the sk was correct in the server
hey thank you very much and well done for spotting the typo
Did you change the account ID?