Official Node.js support
James Padolsey on October 24, 2013
We maintain a handful of official Stripe Client libraries, and we also try to keep our underlying REST API straightforward enough that it's easy for others to build and maintain their own libraries. There are now community-supported bindings in everything from Go to Smalltalk.
Since we launched, Node.js has continued to take over the internet, and we decided that we should really have official Node support. As it happens, Ask Bjørn Hansen has been maintaining a popular Node.js library for around two years. We've worked with him to transfer the stripe
npm module and Github repository to Stripe maintainership. Along the way, we added new documentation, support for promises, a broader test suite, and updates to support a few new resources and methods.
You can install the stripe
module with npm:
npm install stripe
If you previously used the unofficial library to integrate Stripe, just update the module to get the latest version.
In contrast to our other bindings, the Node API maintains strict asynchronicity:
var stripe = require('stripe')( );
stripe.charges.create({
amount: 1600,
currency: 'usd',
customer: customer.id
}, function(err, charge) {
if (err) {
} else {
}
});
You can read more over on the full documentation. If you have feedback, I'd love to hear from you.