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

futurefuture's avatar

Best Place To Store Stripe Keys

Hey there,

Looking for some advice here. I'm using Stripe on my website and using Vue for everything front end.

I'm having trouble figuring out where to store the keys for live and development.

Basically, right now, inside of all components needing Stripe, I have making a call to the server via API and determining the environment.

Then, from there, depengin on the environment, I am selecting which key to use.

This seems messy to me though....I am using VUEX, but not for this. Would anyone recommend storing this in state and grabbing as a computed property?

Thanks in advance!

0 likes
2 replies
futurefuture's avatar

Thanks @ejdelmonico !

I checked out that package - what I ended up doing was just setting state in vuex.

Thanks anyway!

Please or to participate in this conversation.