https://docs.connect.squareup.com/articles/adding-payment-form/ The payment form must be generated on a webpage that uses HTTPS, with one exception: you can test on localhost without using HTTPS.