title: Accept Credit Card Payments via JavaScript
body: <p>I have a Square Account. I also have a web page. On this web page, I'm collecting credit card details (name, number, expiration date, cvv). I want to charge the user an amount against the credit card details they've provided. I thought that Square had an API that allowed this. However, I don't see it. It looks like everything has to be done on the server. </p>
  
  <p>Isn't there a way to securely do this from JavaScript purely on the client-side? It seems riskier to send details over the internet to a server, just to pass that information onto Square.</p>
  
  <p>At this time, I have the following:</p>
  
  <pre><code>var creditCardNumber = '....';
  var credidCardHolderName = 'Joe Smith';
  var creditCardExpiration = '10/2020';
  var creditCardCvv = '...';
  
  var purchaseAmount = 50.50;
  </code></pre>
  
  <p>Is there a way to charge the <code>purchaseAmount</code> against the user's credit card using JavaScript on the client-side via Square? If so, how?</p>
  
  <p>Thank you</p>