#2Clutch-api-key

1 messages · Page 1 of 1 (latest)

proper crater
#

Hi there, you can't retrieve customers using a publishable key. You have to use your secret key for this.

valid sparrow
#

these are the variables i'm using:

stripe.api_key = os.getenv('TEST_STRIPE_API_SECRET')

enhanced_price_id = os.getenv('ENHANCED_PRICE_ID')
premier_price_id = os.getenv('PREMIER_PRICE_ID')

endpoint_secret = os.getenv('STRIPE_ENDPOINT_SECRET')
#

i've been working on this for 2 weeks now, and this is the first i'm running into this issue

#

this was working fine until about 20 minutes ago.

proper crater
#

I'm seeing the publishable key used for that request. So, you should log out the key being used when you are making the request, and if it isn't your secret key then you will need to determine why your publishable key is being grabbed from env

valid sparrow
#

i don't understand.

proper crater
#

What don't you understand? You can't retrieve a customer with your publishable key. The above request used your publishable key.

valid sparrow
#

i double checked again, and it turns out i had my secret publishable keys swapped with the values with my environment variables.

#

thank you!