Created
October 21, 2019 08:39
-
-
Save ademcan/c985df4d3f9c3065afa5a96557e22db7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stripe.paymentMethods.create({ | |
customer: 'cus_XXXXXXX', | |
payment_method: 'pm_XXXXXXX', | |
},{ | |
stripe_account: 'acct_XXXXXXX', | |
}).then(function(paymentMet) { | |
stripe.paymentIntents.create({ | |
amount: 1000, | |
currency: 'chf', | |
application_fee_amount: 123, | |
payment_method: paymentMet.id, | |
confirm: false, | |
capture_method: 'manual' | |
},{ | |
stripe_account: 'acct_XXXXXXX', | |
}, function(err, paymentIntent) { | |
// send client_secret to the front-end | |
console.log(err) | |
res.json({paymentIntent.client_secret}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment