title: Make a Stripe payment with Jquery AJAX? (Javascript ONLY)
body: <p>I am trying to make a custom payment form for Stripe, and I want to make the AJAX call to Stripe manually. (instead of a submit event)</p>
  
  <p>However, first off I am pretty sure I am posting it to the wrong place. But I can't figure out what URL I'm supposed to make this post request to.</p>
  
  <p>If I am using the right url. I am getting a <code>405 not allowed</code> response. With no information on what is wrong with my request.</p>
  
  <p>Here's what I got:</p>
  
  <pre><code>Stripe.setPublishableKey('pk_test_12345');
      Stripe.card.createToken({
        number: ccNum,
        cvc: ccCVC,
        exp_month: ccMonth,
        exp_year: ccYear
      }, stripeResponseHandler);
  </code></pre>
  
  <p>This part works fine, gives me a 200 OK status and I got a token back from the server.</p>
  
  <pre><code>function stripeResponseHandler(status, response) {
        console.log('card status: ', status);
        console.log('token: ', response.id);
        $.ajax({
          type: 'POST',
          url: 'https://checkout.stripe.com/checkout.js',
          headers: {
            stripeToken: response.id
          },
          data: {
            number: ccNum,
            cvc: ccCVC,
            exp_month: ccMonth,
            exp_year: ccYear
          },
          success: (response) =&gt; {
            console.log('successful payment: ', response);
          },
          error: (response) =&gt; {
            console.log('error payment: ', response);
          }
        })
      }
  </code></pre>
  
  <p>This however, gives me the 405 Not Allowed. It seems a bit weird to me that the endpoint would be a .js file. Which is why I am assuming I got the wrong URL.</p>
  
  <p>Can anyone help me figure out how to make a manual post request for a Stripe payment?</p>