#Tifanny - secret
1 messages · Page 1 of 1 (latest)
Hi! Can you double check that you are using the correct key? Based on the error message, it should be your secret key that looks like sk_xxx.
Hi ! Yes I checked again and the secret key starts with sk_live_xxx
and the other key starts with pk_live_xxx
The error message you see is this: https://stripe.com/docs/error-codes#secret-key-required
So somewhere in your code you are using pk_xxx instead of sk_xxx.
Ok, i'm going to check
could it be a problem if I deleted the old secret key and I didn't revoke it ?
Delete means the key is deleted. Revoke means the key is deleted and then re-created.
So both options are possible
I checked and I use private key, but the problem is still here 😕
Can you share the code that generate this error?
Sorry, I found a public key in my code. I try again.
To be clear: sometimes you should use a public key (pk_xxx), for example on your frontend code to display the Payment Element. However on your backend code you should be using a secret key (sk_xxx).
You can learn more about API keys here: https://stripe.com/docs/keys
Thank you so much, it works ! 🤩