node.js - How to correctly create 'charge' in Stripe nodejs library? -
client i'm using stripe checkout custom integration - https://stripe.com/docs/checkout#integration-custom - in following way: var handler = stripecheckout.configure({ key: 'your_key_here', image: 'images/logo-48px.png', token: function(token, args) { $.post("http://localhost:3000/charge", {token: token}, function(res) { console.log("response charge: " + res); }) } }) using custom contrary simple - how can modify stripe checkout instead send ajax request? - because simple not allow me make ajax call. server https://stripe.com/docs/tutorials/charges you've got token user's credit card details, what? charge them money. app.post('/charge', function(req, res) { console.log(json.stringify(req.body, null, 2)); var stripetoken = req.body.token; var charge = stripe.charges.create({ amount: 0005, // amount in cents, again currency: "...