title: "Uncaught TypeError: Cannot read property 'create' of undefined" while using stripe payment method Stripe.charges.create({}) in angularJS/NodeJS
body: <p>Hello I am new to AngularJS and working on a project where i am creating a payment form with stripe. I have create the form and create my JS code as described in the stripe's website. I am getting true response for card verification but payment method gives me this error on console "Uncaught TypeError: Cannot read property 'create' of undefined", </p>
  
  <p>Following is my HTML code:</p>
  
  <pre><code>&lt;div class="checkout_popup" id="checkout_popup"&gt;
      &lt;div class="col-md-12"&gt;&lt;h3&gt;Form&lt;/h3&gt;&lt;/div&gt;
      &lt;form id="payment-form" method="post"&gt;
      &lt;div class="col-md-12"&gt;&lt;input type="email" id="email" placeholder="Email" /&gt;&lt;/div&gt;
      &lt;div class="col-md-12"&gt;&lt;input type="text" id="card-number" data-stripe="number" value="4242424242424242" placeholder="Card Number (16 Digit)"/&gt;&lt;/div&gt;
      &lt;div class="col-md-12"&gt;&lt;input type="text" id="card-cvc" placeholder="cvc" data-stripe="cvc" value="123" /&gt;&lt;/div&gt;
      &lt;div class="col-md-12"&gt;&lt;input type="text" id="card-expiry-month" data-stripe="exp_month" value="12" placeholder="Month Expire" /&gt;&lt;/div&gt;
      &lt;div class="col-md-12"&gt;&lt;input type="text" id="card-expiry-year" data-stripe="exp_year" value="2017" placeholder="Year Expire" /&gt;&lt;/div&gt;
      &lt;div class="col-md-12"&gt;&lt;input type="button" id="pay-now" value="Pay Now" ng-click="submitstripe()" /&gt;&lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and this the JS code:</p>
  
  <pre><code>.controller('UserAccountController', function($scope, $http, $state, $stateParams, $filter) {
   $scope.submitstripe = function(){
          console.log('ready stripe');
  
  
          Stripe.card.createToken({
          number: document.getElementById('card-number').value,
          cvc: document.getElementById('card-cvc').value,
          exp_month: document.getElementById('card-expiry-month').value,
          exp_year: document.getElementById('card-expiry-year').value
          }, stripeResponseHandler);
          return false;
      };
  })
  
  function stripeResponseHandler(status, response) {
  
          if (response.error) { // Problem!
              console.log(response.error.message);
          } else { // Token was created!
              // Get the token ID:
              var token = response.id;
              // Insert the token into the form so it gets submitted to the server:
              console.log('Credit card verified, your token is : '+token);
  
              var email = document.getElementById('email').value;
  
              var charge = Stripe.charges.create({
              amount: 10, // Amount in cents
              currency: "usd",
              source: token,
              description: "test charges"
              }, function(err, charge) {
              if (err &amp;&amp; err.type === 'StripeCardError') {
                  // The card has been declined
                  alert('Your card is not valid');
              }
  
              document.getElementById('card-number').value = '';
              document.getElementById('card-cvc').value = '';
              document.getElementById('card-expiry-month').value = '';
              document.getElementById('card-expiry-year').value = '';
              document.getElementById('checkout_popup').style.display = 'none';
              alert('payment successfull'); 
              });
         }
      }
  </code></pre>