const stripe = require('stripe')('api_key');
stripe.customers.create({ email: 'email_address' }, (error, customer) => {
if (error) {
console.error(error);
} else {
console.log(customer);
}
});
var stripe = require('stripe')('sk_test_FceQdct2QZpFfQZC4Wx9hGeo00ghaTeqAc');
stripe.subscriptions.create(
{
customer: 'cus_HKZRMeUnGPOb66',
items: [{price: 'gold'}],
},
function(err, subscription) {
// asynchronously called
}
);