#ridero
1 messages · Page 1 of 1 (latest)
Hi there, if there's no output or error, you should check if your code is executed at all.
Hi Jack, yes its executed i have tried adding a log right before calling the stripeApi methods and these are printed out so the code is definetely executed
https://dashboard.stripe.com/test/logs do you see any logs in Dashboard?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
No there are no logs showing
I also monitored the network tab when trying out the methods and there was never any request going out to stripe so i suppose there is something wrong with my setup
this is backend code though, to run on a Node backend server, you don't run in a browser, that won't work
for example it's not safe to have secretKey in frontend code where anyone can open the Sources tab and pull that out
So the node sdk only works in backend?
Is there also an sdk that works with frontend+publishable key or do i have to redirect all requests over my backend?
So the node sdk only works in backend?
yes
Is there also an sdk that works with frontend+publishable key
no, operations like getting a list of all your customers and subscriptions are backend server operations
do i have to redirect all requests over my backend?
yes
alright thanks for clearing things up!
so if i wanted to start a checkout session i would also have to go over my backend?
yes, https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout#redirect-customers (submit a form to a backend, backend calls the API with a secret key, backend sends back a URL from the API response), that's how it works
you could consider embedding a PaymentLink into a frontend-only page if that works https://stripe.com/docs/no-code/payment-links