#Milan-Koladiya
1 messages · Page 1 of 1 (latest)
Hi there!
Hello Soma
Thanks for you replay
Is your question how to pass/store the Stripe secret API key in Axios?
I am using create customer endpoint with axios
I'm not at all familiar with Axios, but I see a similar question on StackOverflow. Here's the answer:
You can't make server-side API calls to Stripe from the client side, and you should never (ever [ever ever]) put your Secret Key in client-side code.
https://stackoverflow.com/a/62253924/17427213
okay, thank you @pallid isle
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
yes, thank you @tulip bear
I am using stripe endpoint with Axios for create a customer in reactjs without backend so I pass the header in Axios
{ authorization: "Bearer SECRET KEY" }
so i need to hide the secret key because anyone gets the secret key in network tab and he can get the user details
unfortunately that's a really terrible idea to do and we don't recommend it at all
the only to do that without a backend is to create a "setup" Checkout Session
correct
okay, Thank you! @tulip bear
let me know if you need any more help
no, Thanks!