#devil_api
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1248271366499598438
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello
Not sure what you mean by that. The above indicates how you would initialize Stripe.JS
Which yes, is used for Elements and also for Stripe.JS methods
We also show more examples of this in our Github Repo Readme: https://github.com/stripe/react-stripe-js
Where after calling loadStripe you can use the useStripe effect to then call Stripe.JS
so if I do, loadStripe("my_key")
then const stripe = useStripe()
that stripe instance will be ready to use u say?
i dont understand those examples tahts why,
there's no instance calling it like
stripe.files.create
Are you sure you aren't mixing up our backend API with Stripe.JS?
Like you don't call stripe.files.create() from the frontend
You would use our Node SDK to call that from your backend
Yeah yeah, but that's what I was confused about
can I use stripejs "api" on client side or nah?
No
what are the stripejs methods i can use from useStripe
https://docs.stripe.com/js lists the methods
You don't use most methods from our API client-side because it is not secure to do so.
You would call your backend from your frontend and upload from there. You can't do that with Stripe.JS
Otherwise any nefarious actor could easily just start uploading random files to your account
okay i get what u're saying
but hasura/nexus doesnt support uploading files to backend
so I have to do a frontend call
with your rest api
is that that unsecure?
Yes