title: How to make the actual Stripe charge in Angular (stripeToken already known)?
body: <p>I am using the <a href="https://github.com/tobyn/angular-stripe-checkout" rel="nofollow">Angular-Stripe-Checkout library</a> to create a <code>stripeToken</code> like in this <a href="https://github.com/tobyn/angular-stripe-checkout/blob/master/examples/custom.html" rel="nofollow">example</a>. Some highlights are shown below.</p>
  
  <p>Like in many angular-stripe libraries and examples, it only shows how to create the stripeToken.</p>
  
  <p>However, it is unclear to me how to actually charge the user after having retrieved the stripeToken?</p>
  
  <p>On Stripe they have <a href="https://stripe.com/docs/tutorials/charges" rel="nofollow">instructions</a> on how to charge the user with node.js. But it is unclear to me how to setup this and make it compatible with the Angular. </p>
  
  <hr>
  
  <p><strong>Highlights of the code</strong></p>
  
  <p>html</p>
  
  <pre><code>&lt;button ng-click="product.doCheckout()"&gt;Buy&lt;/button&gt;
  </code></pre>
  
  <p>js</p>
  
  <pre><code>// note: StripeCheckout is injected in the controller
  product.doCheckout = function(token, args) {
  
          // You should configure a handler when the view is loaded,
          // just as you would if you were using checkout.js directly.
          //
          // Unlike a vanilla Stripe Checkout handler, this one can be
          // reused as many times as you like.
          var handler = StripeCheckout.configure({
            name: "Custom Example",
            token: function(token, args) {
                console.log(token.id)
              //$log.debug("Got stripe token: " + token.id);
            }
          });
  
          var options = {
            description: "Ten dollahs!",
            amount: 10000
          };
  
          // The default handler API is enhanced by having open()
          // return a promise. This promise can be used in lieu of or
          // in addition to the token callback (or you can just ignore
          // it if you like the default API).
          //
          // The rejection callback doesn't work in IE6-7.
          handler.open(options)
            .then(function(result) {
              alert("Got Stripe token: " + result[0].id);
              console.log(result);
  
              var stripe = window.Stripe;
              var stripeToken = result[0].id;
  
              //
              // what next?
  
            },function() {
              alert("Stripe Checkout closed without making a sale :(");
            }
          );
      };
  </code></pre>