#burgerboy34

1 messages · Page 1 of 1 (latest)

hot adderBOT
quiet bramble
wooden cave
#

// Set your secret key. Remember to switch to your live secret key in production.
// See your keys here: https://dashboard.stripe.com/apikeys
const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');

const outboundPayment = await stripe.treasury.outboundPayments.create(
{
financial_account: '{{SOURCE_FINANCIAL_ACCOUNT_ID}}',
amount: 2000,
currency: 'usd',
statement_descriptor: 'Test outbound payment to FA',
destination_payment_method_data: {
type: 'financial_account',
financial_account: '{{DESTINATION_FINANCIAL_ACCOUNT_ID}}',
},
},
{
stripeAccount: '{{CONNECTED_ACCOUNT_ID}}',
}
);

#

If I’m logged in with the source account , how can I access the destination account Id? I’m the stripe client

#

Just trying to figure out what best practice is

#

I have account I’d stored in my database for the destination account, do I do a lookup with that? Or is there a better way to get it

quiet bramble
#

Are you asking where you should save the destination_payment_method_data ? i.e., the external account number where you want to transfer the funds to?

wooden cave
#

Yeah trying to see what options are available to get that information when I need to make an outbound payment

quiet bramble
#

That's entirely up to you, you can store it anywhere that works best for your app

wooden cave
#

Ok cool, another question

#

I noticed everytime I send an outbound payment to a financial account in test mode it links a new bank in the external accounts section

#

Example… I sent 3 payments and I had 3 new external accounts added

quiet bramble
#

So you want to create a destination_payment_method and reuse it?

wooden cave
#

I want to be able to transfer money from stripe financial account to another stripe financial account multiple times

quiet bramble
#

Ok, and did you encounter any errors?

wooden cave
#

No it worked but when I visit the stripe dashboard it shows a new external bank account added for each payment

#

Each time I send a payment it adds a bank account with the same fingerprint. Is that normal?

quiet bramble
#

Can you share with me the link to your Dashboard?

wooden cave
quiet bramble
#

I see, that's normal, and they were created through the destination_payment_method_data