DEV Community


Destination Charges in stripe

mehraas profile image Ashish Mehra ・1 min read

Here is the link of stripe documentation for creating destination charges

// Set your secret key: remember to change this to your live secret key in production
// See your keys here:
var stripe = require("stripe")("sk_test_############");

  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 ?


Editor guide
razbounak profile image
Bredillet Thomas

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

mehraas profile image
Ashish Mehra Author

Is it possible to test it with 2 different test account ? One will be main platform and other is connected one.

hudaniabhee profile image
Abhee Hudani ☕

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