1const stripe = require('stripe')('api_key');
2
3stripe.customers.create({ email: 'email_address' }, (error, customer) => {
4 if (error) {
5 console.error(error);
6 } else {
7 console.log(customer);
8 }
9});
1var stripe = require('stripe')('sk_test_FceQdct2QZpFfQZC4Wx9hGeo00ghaTeqAc');
2
3stripe.subscriptions.create(
4 {
5 customer: 'cus_HKZRMeUnGPOb66',
6 items: [{price: 'gold'}],
7 },
8 function(err, subscription) {
9 // asynchronously called
10 }
11);