Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

tgif's avatar
Level 4

Where do I obtain STRIPE_SECRET?

Hi guys, I am configuring stripe and am unable to find the STRIPE_SECRET. This is what services config contains:

'stripe' => [
        'model' => App\User::class,
        'key' => env('STRIPE_KEY'),
        'secret' => env('STRIPE_SECRET'),
]

and my .env file contains:

STRIPE_SECRET=
STRIPE_KEY=sk_test_DNgiBbeRishhp4zLb

Where do I find my Stripe secret? My account settings only provide secret_key and publishable_key

0 likes
4 replies
jekinney's avatar

Lol you answered your question. Stripe secret = secret key

most have a secret and public key. So the naming convention is to start with a noun of what it is for. This case stripe.

1 like
tgif's avatar
Level 4

So why does the services config (out of the box) ask for both if they are the same? Is it because some people call it SECRET_KEY while others STRIPE_SECRET?

jekinney's avatar
jekinney
Best Answer
Level 47

Stripe key is your public key.

You can rename the environment variables as you see fit.

Please or to participate in this conversation.