#bal-react-usestripe

1 messages · Page 1 of 1 (latest)

proper wedgeBOT
dim inlet
#

@empty rapids this is a React requirement, you need to make sure that useStripe() wraps your whole application

empty rapids
#

would I place that in like an App.js?

#

And do we need to have client secret in the app at all times or can it just be generated when we want to handle a payment?

dim inlet
#

bal-react-usestripe

empty rapids
#

now im getting this

dim inlet
#

that error seems pretty descriptive to me.

#

you are trying to initialize Stripe, it takes an API key, you didn't pass an API key

empty rapids
#

const stripe = useStripe();

so useStripe needs it?

dim inlet
#

The docs I linked you to have step by step instructions on how to use Stripe.js in React. They show you how to call loadStripe() for example with an API key.

proper wedgeBOT
empty rapids
#

Lol, sorry I am an idiot its because I placed the API key in process env and I didnt have it in my directory lol

low jetty
#

Ah, so it's working now?