#user1352-server
1 messages · Page 1 of 1 (latest)
hello @novel isle, you're going to need a server to perform the API call to create the PaymentIntent/SetupIntent. Could you explain more about what you're trying to do here?
Thanks for you reply
What I want is ?I have three file it card.html , card.js and the related css file , The last is server and node file , I want to run it from the card.html just not need to use cmd and npm started
How Can I run server with html file without use npm started terminal command.
You can see my file here in this link https://github.com/ao681/accept-payment
Hi there, please allow me to step in to help.
The html, css and js files are the client side, these define how the appearance and what interaction to provide customers.
The server is where the payment requests to Stripe are made, e.g. PaymentIntent/ SetupIntent
How I access the server from my card.html file without needing to run the npm start
If your server is JS, running it with e.g. npm is required to allow requests to be made from client to server
If the server is not running, the requests cannot be made from client to server.
So I can’t accept the server only by the npm
So I can’t access the server only by the npm start
The server folder installed with modules too How I acces them from my crad.html
The capabilities defined within server is accessed via API calls from client.
I would recommend referencing our official example for how this can be achieved: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements