Node.js web payments cannot run in production

Hi Jeff,

To answer your questions:

  1. No, the site cannot be HTTP. All API calls to Square endpoints must be served over HTTPS for security reasons.

  2. To make calls from an HTTPS site to your Node.js server running on HTTP, you would need to set up a reverse proxy. This would involve setting up a web server like Nginx or Apache, which can accept HTTPS connections and then forward the requests to your Node.js server running on HTTP.

  3. To run your Node.js server over HTTPS, you would need to create an HTTPS server in your Node.js application. This involves obtaining an SSL certificate and configuring your Node.js application to use this certificate. There are many tutorials available online that can guide you through this process.

  4. Thank you for your feedback on the migration instructions. We always strive to provide accurate and helpful documentation, and we appreciate your input.

Remember, it’s important to keep your server secure when handling payments. Always ensure that your server is configured correctly and that all communication is encrypted using HTTPS.

This answer was reviewed by @Bryan-Square.