Here is the link of stripe documentation for creating destination charges
https://stripe.com/docs/connect/destination-charges
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
var stripe = require("stripe")("sk_test_############");
stripe.charges.create({
amount: 1000,
currency: "usd",
source: "tok_visa",
destination: {
account: "{CONNECTED_STRIPE_ACCOUNT_ID}",
},
}).then(function(charge) {
// asynchronously called
});
What CONNECTED_STRIPE_ACCOUNT_ID is ? and how I suppose to retreive it ?
Top comments (3)
You must create an account linked with a real other stripe account
This is the main advantage of Stripe connect, if you don't need, don't use connect fonctionnality
stripe.com/docs/connect/quickstart...
Is it possible to test it with 2 different test account ? One will be main platform and other is connected one.
You are supposed to retrieve that ID by logging into your stripe account. And there we'll be a organization account token. If you want you can check my recent post about stripe payment with node js