Skip to content
loading...

Destination Charges in stripe

github logo ・1 min read  

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 ?

twitter logo DISCUSS (2)
markdown guide
 

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.

Classic DEV Post from Jun 19 '19

Is GraphQL the future of APIs?

Graphs are everywhere! What are the main benefits of the data graph structure? Is GraphQL the future of APIs?

Ashish Mehra profile image
I'm aspiring JS developer from Uttarakhand, India.

Tip: You can configure your dev.to reading experience, such as using sans serif fonts.

Go to your the "misc." section of your settings.

Customize dev.to