Last active
January 17, 2016 20:33
-
-
Save refaelos/ca4ede66747cb2c24ad4 to your computer and use it in GitHub Desktop.
stripe charge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stripe = require("stripe")( | |
process.env.NODE_ENV==="production" ? "xxx_live" : "xxx_test" | |
); | |
stripe.charges.create({ | |
amount : 50, | |
currency : "usd", | |
source : token, // obtained with Stripe.js | |
description: "Charge for user" | |
}, function (err, charge) { | |
//... | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment