-
Notifications
You must be signed in to change notification settings - Fork 728
Promises
James Padolsey edited this page Oct 23, 2013
·
3 revisions
Alongside the version 2 release we added support for promises. Every resource method now returns a Promises/A+
compliant promise in addition to supporting the conventional callback:
Using a regular callback:
stripe.customers.create({...}, function(err, customer) {...});
Using a promise:
stripe.customers.create({...})
.then(function(customer){...}, function(err) {...});