I am using the parse cloud code and I need to create a stripe customer and add a credit card to it and save it some how. How would I save the customer to that parse user?
stripe.customers.create({
email: '[email protected]',
card: 12345
}).then(function(customer) {
retu stripe.charges.create({
amount: 1600,
currency: 'usd',
customer: customer.id
});
}).then(function(charge) {
// New charge created on a new customer
}).catch(function(err) {
// Deal with an error
});
