#devil_api

1 messages ¡ Page 1 of 1 (latest)

ashen acornBOT
pine currentBOT
#

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.

ashen acornBOT
#

👋 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.

quasi blaze
#

Hello

near compass
#

Hello

#

I think I have to use loadStirpe()?

quasi blaze
#

That doc indicates how to do this

near compass
#

that doc is for elements no?

#

i need to do a call

#

like stripe.this.that

quasi blaze
#

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

#

Where after calling loadStripe you can use the useStripe effect to then call Stripe.JS

near compass
#

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

quasi blaze
#

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

near compass
#

Yeah yeah, but that's what I was confused about

#

can I use stripejs "api" on client side or nah?

quasi blaze
#

No

near compass
#

what are the stripejs methods i can use from useStripe

quasi blaze
#

You don't use most methods from our API client-side because it is not secure to do so.

near compass
#

i wanna upload a file from fe

#

so i would do it with without stripejs right?

quasi blaze
#

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

near compass
#

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?

quasi blaze
#

Yes

near compass
#

Do I have any way around it?

#

If I can't send files to backend first?

quasi blaze
#

No, you can only upload files to Stripe from a backend

#

No other way