#Team Seeds

1 messages · Page 1 of 1 (latest)

dark tuskBOT
wraith pendant
#

Can you share the specific issue you're having here? You should be able to leverage stripe calls as you've written, in an effect or otherwise. What you do with that is more up to you, though.

zinc cave
#

it won't return the API call because async/await does not work in useEffect

#

are you familiar with react?

wraith pendant
zinc cave
#

can you provide an example of how to make this work with the stripe API specifically?

wraith pendant
#

I don't have any examples of that ready to go, no, but note that you should not be using the stripe package (stripe-node) client side like this with a secret key

#

This SDK is meant for secure server use only, you must not include your secret key in client code

zinc cave
#

yes, i understand. this is for a simple test app

wraith pendant
#

Instead, you should run your own secure back end/api to accept these client request and return the stripe data necessary for the client

#

There should be no issue with the async calls in the effect

zinc cave
#

ok, i'll check this out. thank you